/* "מה אם?" (the "future" screen) */
.fu-wrap { max-width: 560px; padding-top: 0; }
.fu-page .foot { position: static; }
.fu-wrap h2 { margin: 10px 0 6px; font-size: 14px; font-weight: 600; }
/* the vision-board picture fading into the page */
.fu-hero { position: relative; isolation: isolate; margin-inline: calc(-1 * var(--space-16)); padding: var(--space-12) var(--space-16) 14px; }
.fu-hero::before, .fu-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.fu-hero::before { background: url("../pics/budget-bg.jpg") center 22% / cover; -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent); mask-image: linear-gradient(180deg, #000 45%, transparent); }
.fu-hero::after { background: linear-gradient(270deg, rgba(17, 28, 40, 0.9), rgba(17, 28, 40, 0.45)); -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.fu-total { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-8); margin-top: 6px; min-height: 40px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); }
.fu-total span { font-size: 12.5px; color: var(--text-secondary); }
.fu-total small { display: block; font-size: inherit; }
.fu-total b { font-size: 32px; font-weight: 600; line-height: 1; }
.fu-card { margin-top: 2px; padding: 5px 5px 6px; border-radius: 16px; background: var(--color-surface); }
.fu-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: #162C3D; }
.fu-seg button { min-height: 36px; padding: 4px 2px; border: 0; border-radius: 10px; background: transparent; color: #D6E2EA; font: inherit; font-size: 12px; font-weight: 500; line-height: 1.2; }
.fu-seg button[aria-pressed="true"] { background: #79E3C8; color: #102A32; font-weight: 600; }
.fu-box { padding: 6px 10px 0; }
.fu-amount { text-align: center; line-height: 1.2; }
.fu-amount b { font-size: 22px; font-weight: 600; color: var(--accent-gold); }
.fu-amount span { font-size: 12px; color: var(--text-secondary); }
#fu-range { --p: 0%; width: 100%; height: 28px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; }
#fu-range::-webkit-slider-runnable-track { height: 8px; border-radius: 9px; background: linear-gradient(to right, var(--aurora-2) var(--p), var(--gauge-track) var(--p)); }
#fu-range::-moz-range-track { height: 8px; border-radius: 9px; background: var(--gauge-track); }
#fu-range::-moz-range-progress { height: 8px; border-radius: 9px; background: var(--aurora-2); }
#fu-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; border: 3px solid var(--color-surface); background: var(--accent-gold); }
#fu-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--color-surface); background: var(--accent-gold); }
.fu-pick { display: flex; align-items: center; gap: var(--space-8); text-align: center; }
.fu-pick div { flex: 1; min-width: 0; }
.fu-pick b { display: block; font-size: 20px; font-weight: 600; line-height: 1.2; color: var(--accent-gold); }
.fu-pick small { display: block; font-size: 11.5px; color: var(--text-secondary); }
.fu-arrow { flex: none; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--color-text); }
.fu-arrow:disabled { opacity: 0.35; }
.fu-scale { position: relative; height: 32px; margin-inline: 2px; }
.fu-scale::before { content: ""; position: absolute; inset-inline: 0; top: 12px; height: 8px; border-radius: 8px; background: linear-gradient(to left, var(--aurora-1), var(--aurora-2), var(--aurora-3), var(--aurora-4)); }
/* the dots sit where the thumb's centre stops (half a thumb in from each end) */
.fu-dots { position: absolute; inset-inline: 12px; top: 12px; height: 8px; }
.fu-dots i { position: absolute; top: 0; width: 8px; height: 8px; margin-right: -4px; border-radius: 50%; background: var(--bg-app); }
.fu-dots i.now { top: -6px; width: 4px; height: 20px; margin-right: -2px; border-radius: 3px; background: var(--text-primary); }
#fu-trange { position: relative; width: 100%; height: 32px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; }
#fu-trange::-webkit-slider-runnable-track { height: 8px; background: transparent; }
#fu-trange::-moz-range-track { height: 8px; background: transparent; }
#fu-trange::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; border: 3px solid var(--color-surface); background: var(--accent-gold); }
#fu-trange::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--color-surface); background: var(--accent-gold); }
.fu-ends { display: flex; justify-content: space-between; font-size: 11px; color: var(--color-text-faint); }
.fu-risk { margin: 2px 0 4px; text-align: center; font-size: 11.5px; color: var(--color-text-muted); }
.fu-scroll { margin: -5px -5px 11px; padding: 5px; } /* room for the selected card's outline */
.fu-scroll.many { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gauge-track) transparent; }
.fu-line { list-style: none; margin: 0; padding: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.fu-line::before { content: ""; position: absolute; inset-block: 6px; inset-inline-start: 5px; width: 3px; border-radius: 2px; background: var(--gauge-track); }
.fu-line li { position: relative; }
.fu-line li::before { content: ""; position: absolute; top: 50%; inset-inline-start: -21px; width: 13px; height: 13px; margin-top: -7px; border-radius: 50%; background: var(--gauge-track); }
.fu-line li.on::before { background: #79E3C8; }
.fu-line button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 5px; background: var(--polaroid, #f4efe6); color: #17222e; font: inherit; text-align: start; opacity: 0.62; }
.fu-line li.on button { opacity: 1; box-shadow: 0 0 0 3px #79E3C8; }
.fu-line button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }
.fu-pic { flex: none; width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 2px; background: var(--surface-1); font-size: 30px; }
.fu-pic img { width: 100%; height: 100%; object-fit: cover; }
.fu-text { min-width: 0; display: flex; flex-direction: column; }
.fu-text b { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.fu-dates { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 13px; }
.fu-dates del { color: #5f6a74; }
.fu-date { font-weight: 600; }
.fu-line li.on button { flex-direction: column; align-items: stretch; gap: 0; }
.fu-top { display: flex; align-items: center; gap: 10px; }
.fu-top .fu-text { flex: 1; }
.fu-pct { display: flex; flex-direction: column; align-items: center; line-height: 1.05; color: var(--surface-1); }
.fu-pct b { font-size: 26px; font-weight: 700; }
.fu-pct small { font-size: 11px; }
.fu-road { display: flex; height: 10px; margin-top: 8px; border-radius: 9px; overflow: hidden; background: #ded7ca; }
.fu-road u { background: linear-gradient(to left, var(--aurora-1), var(--aurora-2) 35%, var(--aurora-3) 70%, var(--aurora-4)); }
.fu-road i { background: var(--accent-gold); }
.fu-way { display: flex; justify-content: space-between; gap: var(--space-8); margin-top: 2px; font-size: 11px; color: #52606c; }
.fu-way b { color: var(--surface-1); font-weight: 600; text-align: center; }
.fu-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fu-chips > span { padding: 2px 7px; border-radius: var(--radius-pill); background: var(--surface-1); font-size: 11px; color: var(--text-secondary); }
.fu-chips b { font-weight: 600; color: var(--text-primary); }
.fu-chips .c-t b { color: var(--days-label); }
.fu-chips .c-i b { color: var(--accent-gold); }
.fu-chips .c-m b { color: var(--deposit-label); }
.fu-chips del, .fu-chips del b { color: var(--text-muted); }
.fu-change, .fu-note { margin: var(--space-8) 0 0; text-align: center; font-size: 12.5px; color: var(--color-text-muted); }
.fu-empty { text-align: center; color: var(--color-text-muted); margin: var(--space-24) 0; }
/* confirmation: the goal, then exactly what will be updated */
.confirm .fu-cf-goal, .confirm .fu-cf-goal > span:last-child, .confirm .fu-cf-rows, .confirm .fu-cf-note { display: flex; }
.fu-cf-goal { align-items: center; gap: 10px; padding: 6px; border-radius: 6px; background: var(--polaroid, #f4efe6); color: #17222e; text-align: start; }
.confirm .fu-cf-goal > span:last-child { flex-direction: column; font-size: 13px; line-height: 1.35; }
.fu-cf-goal > span:last-child > b { font-size: 15px; }
.fu-cf-goal del { color: #5f6a74; }
.fu-cf-goal .fu-pic { width: 48px; height: 48px; }
.confirm .fu-cf-rows { flex-direction: column; margin-top: 8px; border-radius: 12px; background: var(--surface-input); }
.fu-cf-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; padding: 9px 12px; font-size: 13.5px; border-bottom: 1px solid var(--surface-2); }
.fu-cf-row:last-child { border: 0; }
.fu-cf-row del { color: var(--text-muted); }
.fu-cf-row b { color: var(--accent-gold); font-weight: 600; }
.confirm .fu-cf-note { justify-content: center; margin-top: 8px; text-align: center; font-size: 12px; color: var(--text-muted); }
/* min on the right, growing to the left, whatever the browser does with right-to-left sliders */
#fu-range, #fu-trange { direction: ltr; transform: scaleX(-1); }
.fu-pct { flex: none; max-width: 112px; text-align: center; }
.fu-money { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 8px; font-size: 13px; color: #52606c; }
.fu-money b { color: var(--surface-1); font-weight: 600; }
.fu-money del { color: #6b747c; }

/* wide screens */
.fu-wrap > .titlebar h1:focus { outline: none; }
@media (min-width: 1000px) {
  .fu-wrap { max-width: 960px; padding-top: var(--space-16); padding-bottom: var(--space-16); display: grid; grid-template-columns: 370px minmax(0, 1fr); column-gap: var(--space-16); align-content: start; }
  .fu-wrap > .titlebar { grid-column: 1 / -1; min-height: 77px; box-sizing: border-box; }
  }
@media (min-width: 1024px) { .fu-wrap { max-width: 1160px; } }
@media (min-width: 1000px) {
  #fu-body { display: contents; }
  #fu-body > h2, #fu-body > .fu-scroll, #fu-body > .fu-note, #fu-body > .fu-empty, #fu-body > #fu-back { grid-column: 1 / -1; }
  .fu-hero { grid-column: 1; margin: 0; padding: 20px 22px; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
  .fu-hero::before, .fu-hero::after { -webkit-mask-image: none; mask-image: none; }
  .fu-total { margin: 0; align-items: center; }
  .fu-total span { font-size: 15px; white-space: nowrap; }
  .fu-total b { font-size: 34px; }
  .fu-card { grid-column: 2; margin: 0; padding: 10px; }
  .fu-bar { display: flex; align-items: stretch; gap: 10px; }
  .fu-bar .fu-seg { flex: 1; }
  .fu-seg button { min-height: 44px; font-size: 15px; }
  .fu-box { padding: 12px 18px 6px; }
  .fu-amount b { font-size: 32px; }
  #fu-body > h2 { margin: var(--space-16) 0 8px; font-size: 17px; }
  /* rows of three; in the row of the chosen goal it is wider than its two neighbours (the half pixel keeps a row from breaking while widths animate) */
  .fu-line { flex-direction: row; flex-wrap: wrap; align-items: stretch; gap: var(--space-16); padding: 0; min-height: 362px; }
  .fu-line::before, .fu-line li::before { display: none; }
  .fu-line li { display: flex; min-width: 0; min-height: var(--row, 0); flex: 0 1 calc((100% - 2 * var(--space-16)) / 3 - 0.5px); }
  .fu-line li.beside { flex-basis: calc((100% - 2 * var(--space-16)) / 4.15 - 0.5px); }
  .fu-line li.on { flex-basis: calc((100% - 2 * var(--space-16)) * 2.15 / 4.15 - 0.5px); }
  .fu-line button, .fu-line li.on button { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 10px; overflow: hidden; }
  .fu-line li.on button { padding: 0; }
  .fu-ph { display: block; flex: none; height: 150px; margin-bottom: 10px; overflow: hidden; border-radius: 2px; background: var(--surface-1); text-align: center; font-size: 72px; line-height: 150px; }
  .fu-ph img { width: 100%; height: 100%; object-fit: cover; }
  .fu-line li.on .fu-ph { height: 168px; margin: 0; border-radius: 0; line-height: 168px; }
  .fu-in { display: block; min-width: 0; }
  .fu-line li.on .fu-in { padding: 10px 16px 14px; }
  .fu-in .fu-pic { display: none; }
  .fu-in .fu-text b { font-size: 20px; }
  .fu-in .fu-dates { font-size: 16px; }
  .fu-pct b { font-size: 40px; }
  .fu-pct small { font-size: 14px; }
  .fu-money { font-size: 15px; }
  .fu-road { height: 14px; }
  .fu-way { font-size: 13px; white-space: nowrap; }
  .fu-chips { margin-top: 10px; }
  .fu-chips > span { padding: 4px 11px; font-size: 13px; white-space: nowrap; }
}
/* laptops: everything tighter, and the pictures take whatever height is left, so the full cards fit the screen */
@media (min-width: 1000px) and (max-height: 860px) {
  .fu-hero { padding: 10px 20px; }
  .fu-card { padding: 7px 8px 4px; }
  .fu-seg { padding: 3px; }
  .fu-seg button { min-height: 32px; font-size: 14px; }
  .fu-box { padding: 4px 16px 0; }
  .fu-amount b { font-size: 24px; }
  #fu-range { height: 26px; }
  .fu-pick b { font-size: 17px; }
  .fu-pick small { font-size: 11px; line-height: 1.3; }
  .fu-arrow { width: 30px; height: 30px; }
  .fu-scale { height: 24px; }
  .fu-scale::before, .fu-dots { top: 8px; }
  #fu-trange { height: 24px; }
  .fu-ends, .fu-risk { font-size: 10.5px; line-height: 1.3; }
  .fu-risk { margin: 0 0 2px; }
  #fu-body > h2 { margin: 8px 0 5px; font-size: 15px; }
  .fu-line { min-height: 0; }
  .fu-ph, .fu-line li.on .fu-ph { height: clamp(80px, calc(100vh - 555px), 168px); line-height: clamp(80px, calc(100vh - 555px), 168px); }
  .fu-ph { margin-bottom: 8px; font-size: 48px; }
  .fu-line li.on .fu-ph { margin-bottom: 0; }
  .fu-line li.on .fu-in { padding: 6px 14px 8px; }
  .fu-in .fu-text b { font-size: 17px; }
  .fu-in .fu-dates { font-size: 14px; }
  .fu-text b { line-height: 1.3; }
  .fu-pct b { font-size: 28px; }
  .fu-pct small { font-size: 12px; }
  .fu-money { margin-top: 3px; font-size: 13.5px; }
  .fu-road { height: 10px; margin-top: 4px; }
  .fu-way { font-size: 12px; }
  .fu-chips { margin-top: 5px; }
  .fu-chips > span { padding: 2px 10px; font-size: 12px; }
  .fu-note { margin-top: 4px; font-size: 11.5px; }
  .fu-page .foot { padding-block: 6px; font-size: 12px; }
  .fu-wrap { padding-bottom: 4px; }
}
.fu-help.fu-help { display: block; padding: 0; margin: 0; }
.fu-help.fu-help > li { list-style: none; width: 100%; margin: 0; }
.fu-help.fu-help > li::before, .fu-help.fu-help > li::after, .fu-help.fu-help::before, .fu-help.fu-help::after { content: none; }
@media (min-width: 1000px) { .fu-topsave .dirty-note:not([hidden]) { display: inline-flex; } }
