/* Aishel House Pushka. Colors, type and radii follow the Aishel House design
   system; the pushka itself uses the colors of the printed pushka label. */

@font-face {
  font-family: 'Montserrat';
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/source-sans-3-latin.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('../fonts/source-sans-3-latin-italic.woff2') format('woff2');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Frank Ruhl Libre';
  src: url('../fonts/frank-ruhl-libre-hebrew.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Frank Ruhl Libre';
  src: url('../fonts/frank-ruhl-libre-latin.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}

:root {
  --paper: #f7f2ea;
  --paper-2: #fbf7f0;
  --white: #ffffff;
  --ink: #1a2a33;
  --ink-soft: #3d4f58;
  --ink-mute: #6b7b83;
  --line: #e6ded2;
  --line-soft: #f0e9dd;
  --brand: #317c98;
  --brand-hover: #28637a;
  --brand-press: #1f4a5c;
  --accent: #ba9771;
  --accent-hover: #9c7e5d;
  --teal-50: #eef5f8;
  --teal-900: #15323f;
  --gold-50: #fbf6ef;
  --gold-800: #5c4a35;
  --danger: #b0463a;

  /* The printed pushka label. */
  --tin-blue: #3f88b0;
  --tin-gold: #c19d69;
  --tin-gold-light: #dfcaaa;

  --font-display: 'Montserrat', 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-hebrew: 'Frank Ruhl Libre', 'David', 'Times New Roman', serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(45, 30, 20, 0.06);
  --shadow-md: 0 4px 12px rgba(45, 30, 20, 0.08);
  --shadow-lg: 0 16px 40px rgba(45, 30, 20, 0.12);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --fast: 150ms;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--line-soft);
  color: var(--ink);
  font: 400 16px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

h1,
h2,
p {
  margin: 0;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--brand);
}

svg {
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 3px solid rgba(49, 124, 152, 0.45);
  outline-offset: 2px;
}

/* ---------- Frame ---------- */

/* The app fills exactly the visible screen and stays there. The page behind
   it never scrolls; a screen with more on it than fits (a long activity
   list, say) scrolls inside itself. */
.app {
  position: fixed;
  inset: 0;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}

.view {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.screen {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: calc(env(safe-area-inset-top) + 20px) 24px calc(env(safe-area-inset-bottom) + 24px);
}

.screen-plain {
  padding-top: 24px;
}

.screen-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.eyebrow {
  font: 700 12px/1.3 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-800);
}

.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.head-titles {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.head h1 {
  font: 800 22px/1.15 var(--font-display);
  letter-spacing: -0.02em;
}

/* On the narrowest phones the title shrinks to stay on one line beside the logo. */
@media (max-width: 350px) {
  .head h1 {
    font-size: 19px;
  }
}

.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--white);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.subhead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: -12px;
}

.subhead h1 {
  font: 700 20px/1.3 var(--font-display);
}

.back {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 18px 16px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.card-title {
  font: 700 16px/22px var(--font-display);
}

.hint {
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-soft);
}

.caption {
  text-align: center;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-soft);
}

.caption.is-full {
  font-weight: 600;
  color: var(--ink);
}

.fineprint {
  text-align: center;
  font-size: 13px;
  line-height: 18px;
  color: var(--ink-soft);
}

.error {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--danger);
}

.error-center {
  text-align: center;
}

.logo {
  display: block;
  flex: none;
  object-fit: contain;
}

/* ---------- Buttons and form controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--brand);
  font: 700 15px/1.2 var(--font-display);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}

.btn svg {
  width: 20px;
  height: 20px;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-wide {
  width: 100%;
  min-height: 52px;
  font-size: 16px;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-accent {
  border-color: var(--tin-gold);
  background: var(--tin-gold);
  color: var(--ink);
}

@media (hover: hover) {
  .btn:hover:not(:disabled) {
    background: var(--brand);
    color: var(--white);
  }
  .btn-primary:hover:not(:disabled) {
    border-color: var(--brand-hover);
    background: var(--brand-hover);
  }
  .btn-accent:hover:not(:disabled) {
    background: var(--tin-gold);
    color: var(--ink);
    box-shadow: var(--shadow-md);
  }
  a:hover {
    color: var(--brand-hover);
  }
}

.link-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: 700 14px/1.2 var(--font-display);
  cursor: pointer;
}

.link-btn svg {
  width: 20px;
  height: 20px;
}

input[type='text'],
input[type='time'],
select {
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 16px;
}

input[type='text']:focus,
input[type='time']:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(49, 124, 152, 0.15);
  outline: none;
}

.switch-row,
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.switch-row {
  cursor: pointer;
}

.money-field {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font: 700 16px/1 var(--font-display);
}

.money-field input {
  width: 84px;
  text-align: right;
  font: 700 16px/1 var(--font-display);
}

.switch-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

input[role='switch'] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  margin: 0;
  border-radius: 999px;
  background: var(--ink-mute);
  cursor: pointer;
  transition: background-color var(--fast) var(--ease);
}

input[role='switch']::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--fast) var(--ease);
}

input[role='switch']:checked {
  background: var(--brand);
}

input[role='switch']:checked::before {
  transform: translateX(20px);
}

/* ---------- Pushka screen ---------- */

.banner {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--gold-50);
  box-shadow: var(--shadow-sm);
  font-size: 15px;
  line-height: 22px;
  color: var(--ink-soft);
}

.banner strong {
  display: block;
  font: 700 15px/22px var(--font-display);
  color: var(--ink);
}

.week {
  gap: 8px;
  padding: 10px 8px 12px;
}

.week-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-soft);
}

.week-head span:first-child {
  font-weight: 600;
}

.week-days {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.week-days li {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 16px;
  color: var(--ink-soft);
}

.week-days .is-today {
  font-weight: 600;
  color: var(--ink);
}

.day-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
}

.day-dot svg {
  width: 16px;
  height: 16px;
}

.is-today .day-dot {
  border: 2px solid var(--brand);
}

.is-given .day-dot {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--white);
}

.is-given .day-dot svg {
  stroke-width: 2;
}

.is-shabbos {
  color: var(--gold-800);
}

.is-shabbos .day-dot {
  border-color: var(--gold-50);
  background: var(--gold-50);
  color: var(--gold-800);
}

/* The pushka: a round tin wearing the printed label. */

.tin {
  position: relative;
  flex: none;
  align-self: center;
  width: 280px;
  height: 322px;
}

.tin-shadow {
  position: absolute;
  left: 26px;
  top: 300px;
  width: 228px;
  height: 22px;
  border-radius: 50%;
  background: rgba(45, 30, 20, 0.18);
  filter: blur(7px);
}

.tin-body {
  position: absolute;
  left: 10px;
  top: 52px;
  width: 260px;
  height: 258px;
  overflow: hidden;
  /* Keeps the layers inside the tin beneath the lid. */
  isolation: isolate;
  border-radius: 0 0 130px 130px / 0 0 18px 18px;
}

/* The gold rim under the lid. Its lower edge follows the front of the lid,
   so the top of the label curves the same way as the bottom. */
.tin-rim {
  position: absolute;
  z-index: 2;
  left: 0;
  top: 0;
  width: 260px;
  height: 28px;
  border-radius: 0 0 130px 130px / 0 0 18px 18px;
  background: var(--tin-gold);
}

/* The label's lower edge follows the curve of the tin, so the gold band
   beneath it curves the same way. */
.tin-label {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 10px;
  width: 260px;
  height: 212px;
  border-radius: 0 0 130px 130px / 0 0 18px 18px;
  background: var(--tin-blue);
}

.tin-label img {
  display: block;
  width: 260px;
  height: 190px;
  margin-top: 4px;
  object-fit: contain;
}

.tin-band {
  position: absolute;
  left: 0;
  top: 204px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 260px;
  height: 54px;
  padding: 12px 22px 0;
  background: var(--tin-gold);
}

/* On the pushka screen the band is a gauge: pale gold, filling with gold
   from the left as the pushka nears its full amount. */
.tin-gauge {
  background: var(--tin-gold-light);
}

.tin-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--tin-gold);
  transition: width 400ms var(--ease);
}

/* The words in the band are drawn along an arc, so they wrap around the
   tin with the band: the total in the middle, a few words either side. */
.tin-text {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: var(--ink);
  stroke: none;
}

.tin-text path {
  fill: none;
}

.tin-count {
  font: 600 13px var(--font-body);
}

.tin-total {
  font: 800 20px var(--font-display);
  letter-spacing: -0.02em;
}

/* Long totals shrink to stay inside the band. */
.tin-total.is-long {
  font-size: 16px;
}

.tin-of {
  font: 600 12px var(--font-body);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tin-shade {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(21, 50, 63, 0.22) 0%,
    rgba(21, 50, 63, 0.05) 12%,
    rgba(255, 255, 255, 0.1) 32%,
    rgba(21, 50, 63, 0) 55%,
    rgba(21, 50, 63, 0.08) 82%,
    rgba(21, 50, 63, 0.24) 100%
  );
}

.tin-lid {
  position: absolute;
  left: 10px;
  top: 34px;
  width: 260px;
  height: 36px;
  border: 2px solid var(--tin-gold);
  border-radius: 50%;
  background: var(--tin-gold-light);
}

.tin-slot {
  position: absolute;
  left: 92px;
  top: 12px;
  width: 72px;
  height: 8px;
  border-radius: 999px;
  background: var(--teal-900);
}

.tin-coin-clip {
  position: absolute;
  left: 0;
  top: 0;
  width: 280px;
  height: 52px;
  overflow: hidden;
}

.tin-coin {
  position: absolute;
  left: 118px;
  top: 18px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--tin-gold);
  box-shadow: inset 0 0 0 2px var(--accent-hover);
}

.coins {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.tray {
  display: flex;
  gap: 12px;
}

.coin,
.coin-fly {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--tin-gold);
  color: var(--ink);
  font: 700 16px/1 var(--font-display);
}

.coin {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  box-shadow: var(--shadow-sm), inset 0 0 0 3px var(--accent-hover);
  cursor: pointer;
}

.coin:active {
  transform: scale(0.96);
}

.coin.is-long {
  font-size: 13px;
}

.coin-fly {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  box-shadow: inset 0 0 0 2px var(--accent-hover);
  font-size: 13px;
  pointer-events: none;
}

input.coin-input {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid var(--brand);
  border-radius: 999px;
  text-align: center;
  font: 700 15px/1 var(--font-display);
}

.coin-edit {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  background: var(--white);
  color: var(--brand);
  cursor: pointer;
}

.coin-edit svg {
  width: 20px;
  height: 20px;
}

.coin-edit .icon-check,
.coin-edit.is-editing .icon-pencil {
  display: none;
}

.coin-edit.is-editing .icon-check {
  display: block;
  stroke-width: 2;
}

.givebar {
  flex: none;
  display: flex;
  gap: 12px;
  padding: 12px 24px calc(env(safe-area-inset-bottom) + 16px);
  border-top: 1px solid var(--line);
  background: var(--white);
}

.givebar .btn {
  flex: 1 1 0;
  font-size: 14px;
}

#view-pushka {
  overflow: hidden;
}

#view-pushka .screen {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  gap: 16px;
  padding-bottom: 20px;
}

/* When a banner is showing, the pushka shrinks to keep the buttons in view. */
@media (min-height: 761px) {
  #view-pushka .screen:has(.banner:not([hidden])) .tin {
    transform: scale(0.78);
    transform-origin: top center;
    margin-bottom: -71px;
  }
}

/* On short phones the pushka shrinks so the coins and buttons stay in reach. */
@media (max-height: 760px) {
  .tin {
    transform: scale(0.84);
    transform-origin: top center;
    margin-bottom: -52px;
  }
}

/* The welcome pushka shrinks sooner, so the Begin button never slips below the screen. */
@media (max-height: 899px) {
  .view-welcome .tin {
    transform: scale(0.78);
    transform-origin: top center;
    margin-bottom: -71px;
  }
}

@media (max-height: 760px) {
  .view-welcome .tin {
    transform: scale(0.7);
    margin-bottom: -97px;
  }
}

@media (max-height: 700px) {
  .tin {
    transform: scale(0.72);
    margin-bottom: -90px;
  }
  #view-pushka .screen {
    gap: 12px;
    padding-top: calc(env(safe-area-inset-top) + 14px);
    padding-bottom: 14px;
  }
  .welcome-top {
    gap: 12px;
    padding-bottom: 16px;
  }
  .view-welcome .tin {
    transform: scale(0.52);
    margin-bottom: -155px;
  }
  .welcome-panel {
    gap: 10px;
    padding-top: 20px;
    padding-bottom: max(36px, calc(env(safe-area-inset-bottom) + 24px));
  }
  .welcome-panel h1 {
    font-size: 30px;
  }
  .welcome-panel .btn {
    margin-top: 6px;
  }
}

/* The room each pushka picture may fill. */
.tin-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The pushka sizes itself to the room that is left on the screen, whatever
   the phone's height or text size, so the pushka and welcome screens only
   scroll (inside themselves) on a phone too small to show everything even
   with the pushka at its smallest. The app measures the room and sets
   --tin-scale; until it has, the fixed steps above apply. (This was once a
   sum done in the stylesheet, which some iPhones got wrong and drew the
   pushka upside down.) */
.fit-tin .tin-stage {
  flex: 1 1 0;
  align-self: stretch;
  min-height: 110px;
  overflow: hidden;
}

.fit-tin #view-pushka #tin,
.fit-tin .view-welcome .tin-stage .tin {
  margin: 0;
  transform: scale(var(--tin-scale, 0.7));
  transform-origin: center;
}

/* ---------- Empty the pushka ---------- */

.gift {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 0 16px;
  text-align: center;
}

.gift-amount {
  font: 800 72px/1.15 var(--font-display);
  letter-spacing: -0.02em;
}

.gift-note {
  color: var(--ink-soft);
}

.steps {
  gap: 0;
  padding: 4px 16px;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  line-height: 24px;
}

.steps li + li {
  border-top: 1px solid var(--line-soft);
}

.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--brand-press);
  font: 700 14px/1 var(--font-display);
}

/* ---------- Thank you ---------- */

.thanks-panel {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top) + 56px) 32px 36px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: var(--teal-900);
  color: var(--paper-2);
  text-align: center;
}

.thanks-check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
}

.thanks-check svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.thanks-hebrew {
  margin-top: 8px;
  font: 700 36px/1.2 var(--font-hebrew);
  color: var(--accent);
}

.thanks-panel h1 {
  font: 800 32px/1.15 var(--font-display);
  letter-spacing: -0.02em;
}

.thanks-lead {
  font-size: 18px;
  line-height: 26px;
}

.thanks-note {
  font-size: 14px;
  line-height: 20px;
}

.receipt {
  gap: 0;
  padding: 4px 16px;
}

.receipt div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
}

.receipt div + div {
  border-top: 1px solid var(--line-soft);
}

.receipt dt {
  font-size: 15px;
  color: var(--ink-soft);
}

.receipt dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.receipt .receipt-amount {
  font: 700 16px/1.2 var(--font-display);
}

/* ---------- Account ---------- */

.group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rows {
  gap: 0;
  padding: 0 16px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}

.row + .row {
  border-top: 1px solid var(--line-soft);
}

.row-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--brand);
}

.row-icon svg {
  width: 20px;
  height: 20px;
}

.row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.row-title {
  line-height: 22px;
  font-weight: 600;
}

.row-sub {
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-soft);
}

.chevron {
  width: 20px;
  height: 20px;
  color: var(--ink-soft);
}

/* A quiet text button, for the lesser choice on a screen. */
.quiet-link {
  align-self: center;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--brand);
  font: 600 15px/20px var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.services {
  gap: 0;
  padding: 4px 16px;
  list-style: none;
}

.services li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
}

.services li + li {
  border-top: 1px solid var(--line-soft);
}

.services li::before {
  content: '';
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
}

.contact-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px 12px;
  border-radius: var(--radius-lg);
  background: var(--teal-900);
  color: var(--paper-2);
}

.contact-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  line-height: 22px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 6px 0;
}

/* The street on one line, the city, state and zip code on the next. */
#org-address {
  white-space: pre-line;
}

.contact-list li + li {
  border-top: 1px solid rgba(251, 247, 240, 0.14);
}

.contact-list svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--tin-gold);
}

.contact-list a {
  color: inherit;
}

/* ---------- Where it goes ---------- */

.impact-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: var(--teal-900);
  color: var(--paper-2);
  font-size: 15px;
  line-height: 22px;
}

.impact-stat {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.impact-stat strong {
  font: 800 44px/1.15 var(--font-display);
  letter-spacing: -0.02em;
}

.impact-stat span {
  font: 700 14px/20px var(--font-display);
  color: var(--tin-gold);
}

/* ---------- Reminders ---------- */

#reminders-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#push-notice {
  background: var(--gold-50);
}

.times {
  margin: 0;
  padding: 0;
  list-style: none;
}

.times li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border-top: 1px solid var(--line-soft);
}

.times input,
.times select {
  height: 40px;
}

.times input {
  flex: none;
  padding: 0 8px;
}

.times select {
  flex: 1;
  min-width: 0;
  padding: 0 8px;
}

.time-remove {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.time-remove svg {
  width: 20px;
  height: 20px;
}

/* ---------- Activity ---------- */

.summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 24px 24px;
  border-radius: var(--radius-lg);
  background: var(--teal-900);
  color: var(--paper-2);
}

.summary .eyebrow {
  color: var(--accent);
}

.summary-amount {
  font: 800 44px/1.15 var(--font-display);
  letter-spacing: -0.02em;
}

.summary-line {
  font-size: 15px;
  line-height: 22px;
}

.summary-note {
  margin-top: 8px;
  font-size: 14px;
  line-height: 20px;
}

.activity {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.month {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.month ul {
  gap: 0;
  padding: 0 16px;
  list-style: none;
}

.month li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.month li + li {
  border-top: 1px solid var(--line-soft);
}

.month .what {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 22px;
  font-weight: 600;
}

.month .when {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--ink-soft);
}

.month .amount {
  font: 700 16px/1.2 var(--font-display);
}

.empty-state {
  padding: 24px 8px;
  text-align: center;
  color: var(--ink-soft);
}

/* ---------- Welcome ---------- */

.welcome-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(env(safe-area-inset-top) + 16px) 32px 24px;
}

.bh {
  font: 500 14px/18px var(--font-hebrew);
  color: var(--gold-800);
}

.welcome-panel {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 32px max(64px, calc(env(safe-area-inset-bottom) + 40px));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--teal-900);
  color: var(--paper-2);
}

.welcome-panel h1 {
  font: 800 34px/1.15 var(--font-display);
  letter-spacing: -0.02em;
}

.welcome-panel h1 span {
  color: var(--tin-gold);
}

.welcome-panel p {
  font-size: 17px;
  line-height: 26px;
}

.welcome-panel .btn {
  margin-top: 10px;
}

/* How to put the pushka on the Home Screen, for someone who opened the link. */
.install-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding: 12px 16px;
  border: 1px solid rgba(251, 247, 240, 0.2);
  border-radius: var(--radius-md);
}

.install-box h2 {
  margin: 0;
  font: 700 12px/16px var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tin-gold);
}

.welcome-panel .install-box p {
  font-size: 15px;
  line-height: 22px;
}

.inline-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  color: var(--tin-gold);
}

.welcome-panel .install-box .btn {
  margin-top: 6px;
}

/* The lesser choice inside the box: copying the link by hand. */
.install-box .quiet-link {
  color: var(--paper-2);
}

/* While the steps are showing, carrying on in the browser is a quiet link. */
.has-install #begin-btn {
  min-height: 44px;
  margin-top: 0;
  border-color: transparent;
  background: transparent;
  color: var(--paper-2);
  font: 600 15px/20px var(--font-body);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* A browser tab is shorter than the Home Screen app, so while the steps are
   showing the welcome screen gives up a little to keep Begin on the screen. */
@media (max-height: 780px) {
  .has-install .welcome-more {
    display: none;
  }
}

@media (max-height: 700px) {
  .has-install .tin-stage {
    min-height: 84px;
  }
  .has-install .welcome-panel {
    padding-bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  }
}

@media (max-height: 600px) {
  .has-install .welcome-top {
    gap: 8px;
    padding-top: calc(env(safe-area-inset-top) + 10px);
    padding-bottom: 12px;
  }
  .has-install .welcome-panel {
    gap: 8px;
    padding-top: 16px;
  }
  .has-install .welcome-panel h1 {
    font-size: 26px;
  }
  .has-install .welcome-panel .logo {
    display: none;
  }
}

.welcome-panel :focus-visible,
.thanks-panel :focus-visible,
.contact-panel :focus-visible {
  outline-color: rgba(193, 157, 105, 0.8);
}

/* ---------- The test pushka's marker ---------- */

.test-tab {
  position: fixed;
  z-index: 60;
  top: env(safe-area-inset-top);
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 12px 2px;
  border: 0;
  border-radius: 0 0 8px 8px;
  background: var(--danger);
  color: var(--white);
  font: 700 11px/16px var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Tapping the marker shows this phone's measurements, for sorting out layout problems. */
.test-panel {
  position: fixed;
  z-index: 59;
  top: calc(env(safe-area-inset-top) + 26px);
  left: 12px;
  right: 12px;
  max-width: 406px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--teal-900);
  color: var(--paper-2);
  box-shadow: var(--shadow-lg);
  font: 400 12px/17px ui-monospace, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  top: calc(env(safe-area-inset-top) + 12px);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: min(100% - 32px, 398px);
  padding: 8px 8px 8px 16px;
  border-radius: var(--radius-md);
  background: var(--teal-900);
  color: var(--paper-2);
  font-size: 15px;
  line-height: 22px;
  box-shadow: var(--shadow-lg);
  transform: translateX(-50%);
}

.toast-action {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--tin-gold);
  font: 700 14px/1 var(--font-display);
  cursor: pointer;
}

.toast-action:focus-visible {
  outline-color: rgba(193, 157, 105, 0.8);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before {
    transition: none !important;
  }
}
