/*
 * Pastel edition finish (29 Nov 2026): the main card, "Can I afford it?", and the premium surfaces on every screen.
 * Loaded after phone.css and desk.css. Colours come from the theme variables in base.css,
 * so all five pastel themes (Blush, Lavender, Mint, Sage, Latte) repaint this too.
 */

/* ---------- the main card (both layouts) ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; color: var(--hero-ink);
  background:
    radial-gradient(60% 80% at 0% 0%, rgb(255 255 255 / .85), transparent 60%),
    radial-gradient(55% 70% at 100% 0%, rgb(255 246 236 / .7), transparent 65%),
    linear-gradient(160deg, var(--hero-1) 0%, var(--hero-2) 50%, var(--hero-3) 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .75), inset 0 1px 0 #fff,
    0 2px 4px color-mix(in srgb, var(--hero-ink) 6%, transparent),
    0 34px 64px -34px color-mix(in srgb, var(--accent-d) 45%, transparent); }
/* fine grain, like good paper */
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

.hpill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px 0 6px; border-radius: 999px; font-size: .84rem; font-weight: 800;
  background: rgb(255 255 255 / .62); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .9), 0 4px 10px -6px color-mix(in srgb, var(--hero-ink) 40%, transparent); color: var(--hero-ink); }
.hpi { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .72rem; font-weight: 800; line-height: 1; }
.hero.good .hpi { background: var(--good); } .hero.good .hpi::before { content: '\2713'; }
.hero.warn .hpi { background: #D89E2C; } .hero.warn .hpi::before { content: '!'; }
.hero.over .hpi { background: var(--over); } .hero.over .hpi::before { content: '!'; }

.hlab { margin: 16px 0 0; font-size: 1.02rem; font-weight: 700; color: color-mix(in srgb, var(--hero-ink) 72%, transparent); }
.hbig { margin: 2px 0 0; font-family: var(--fd); font-weight: 500; line-height: 1; letter-spacing: -.04em; transform-origin: left center; }
.ph .hbig, .desk #d-big { background: linear-gradient(180deg, var(--hero-ink) 35%, var(--accent-d) 125%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hbig small { font-size: 1em; }
.hbig small:first-child { font-size: .42em; vertical-align: .95em; margin-right: .04em; -webkit-text-fill-color: var(--accent); }
.hwhen { margin: 0; font-size: 1.02rem; font-weight: 700; color: color-mix(in srgb, var(--hero-ink) 72%, transparent); letter-spacing: 0; }

/* how much of the budget is used, with a marker where you are */
.htrack { position: relative; height: 10px; border-radius: 999px; margin-top: 20px; background: color-mix(in srgb, var(--hero-ink) 11%, transparent); box-shadow: inset 0 1px 2px color-mix(in srgb, var(--hero-ink) 14%, transparent); }
.htrack > span { position: relative; display: block; height: 100%; min-width: 10px; border-radius: 999px; transition: width .4s; }
.htrack > span::after { content: ''; position: absolute; right: -9px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #FBF7F0 60%, #EADFCF); box-shadow: 0 0 0 4px rgb(255 255 255 / .6), 0 3px 8px color-mix(in srgb, var(--hero-ink) 35%, transparent); }
.hero.good .htrack > span { background: linear-gradient(90deg, #4FA374, #8FCFA4); box-shadow: 0 0 14px rgb(95 175 126 / .45); }
.hero.warn .htrack > span { background: linear-gradient(90deg, #E0AE45, #F2C94C 70%, #F8DC86); box-shadow: 0 0 14px rgb(242 201 76 / .5); }
.hero.over .htrack > span { background: linear-gradient(90deg, #E0806C, #F2A08E); box-shadow: 0 0 14px rgb(224 128 108 / .45); }
.hero.over .htrack > span::after { right: -2px; width: 4px; height: 26px; margin-top: -13px; border-radius: 4px; background: var(--over); box-shadow: none; }
.hmeta { display: flex; justify-content: space-between; gap: 12px; margin-top: 11px; font-size: .86rem; font-weight: 600; color: color-mix(in srgb, var(--hero-ink) 70%, transparent); font-variant-numeric: tabular-nums; }
.hcalm { margin: 16px 0 0; font-size: .98rem; font-weight: 600; line-height: 1.45; color: var(--hero-ink); }

.hmain { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px; margin-top: 20px; border: none; border-radius: 18px; cursor: pointer;
  font-weight: 800; font-size: 1.05rem; color: var(--on-accent); background: linear-gradient(180deg, var(--accent), var(--accent-d));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 14px 26px -12px color-mix(in srgb, var(--accent-d) 75%, transparent); transition: transform .12s; }
.hmain:active { transform: translateY(1px); }
.hmain svg { width: 20px; height: 20px; }
.hlink { display: block; width: 100%; min-height: 46px; margin-top: 4px; border: none; background: none; cursor: pointer; font-weight: 700; font-size: .95rem; color: var(--hero-ink);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--hero-ink) 35%, transparent); }

/* ---------- phone home ---------- */
.ph .home { overflow-y: auto; }
.ph .hero { margin: 12px 16px 0; padding: 22px 20px 12px; border-radius: 28px; }
.ph .hbig { font-size: clamp(3.6rem, 19vw, 5.2rem); }
.ph .horizon { margin-top: 2px; }
.ph .peek { margin-top: auto; }
.ph .hbig.pop { animation: ph-pop .4s ease-out; }

/* ---------- computer home ---------- */
.desk .hero { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 34px; align-items: center; padding: 28px 30px 30px 34px; border-radius: 30px; }
.desk .h-main { min-width: 0; }
.desk .hbig { font-size: 6rem; }
.desk .hbig .hwhen { margin-left: 4px; font-size: 1.3rem; }
.desk .htrack, .desk .hmeta { max-width: 560px; }
.desk .hmain { width: auto; padding: 0 28px; display: inline-flex; }
.desk .horizon { display: flex; gap: 3px; background: rgb(255 255 255 / .5); border-radius: 999px; padding: 3px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .8); }
.desk .horizon button { border: none; background: none; font-weight: 700; font-size: .8rem; color: color-mix(in srgb, var(--hero-ink) 70%, transparent); padding: 7px 15px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.desk .horizon button.on { background: var(--card); color: var(--hero-ink); box-shadow: var(--sh-sm); }
.desk #d-big { display: inline-block; transform-origin: left center; }
.desk #d-big.pop { animation: dk-pop .4s ease-out; }
@media (max-width: 1279px) { .desk .hero { grid-template-columns: 1fr; } .desk .afford { max-width: 520px; } }

/* "Can I afford it?" panel: frosted glass inside the card */
.afford { border-radius: 22px; padding: 22px 22px 20px; color: var(--hero-ink); border: 1px solid transparent;
  background: linear-gradient(160deg, rgb(255 255 255 / .74), rgb(255 255 255 / .48)) padding-box, linear-gradient(150deg, #fff, rgb(255 255 255 / .3)) border-box;
  box-shadow: 0 20px 40px -26px color-mix(in srgb, var(--hero-ink) 45%, transparent); }
.afford h3 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.afford p { margin: 4px 0 0; font-size: .88rem; font-weight: 600; color: color-mix(in srgb, var(--hero-ink) 65%, transparent); }
.afford .fld { display: flex; align-items: center; gap: 4px; margin-top: 14px; height: 68px; padding: 0 16px; border-radius: 16px; background: #fff; cursor: text;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hero-ink) 12%, transparent); font-family: var(--fd); font-size: 2.3rem; }
.afford .fld:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }
.afford .fld span { color: var(--accent); font-size: .7em; }
.afford .fld input { flex: 1; min-width: 0; border: none; outline: none; background: none; font: inherit; color: var(--hero-ink); }
.afford .fld input::placeholder { color: color-mix(in srgb, var(--hero-ink) 28%, transparent); }
.afford .go { width: 100%; height: 50px; margin-top: 12px; border: none; border-radius: 15px; cursor: pointer; font-weight: 800; font-size: .95rem; color: var(--on-accent);
  background: linear-gradient(180deg, var(--accent), var(--accent-d)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 10px 20px -10px color-mix(in srgb, var(--accent-d) 70%, transparent); }

/* the answer, used on the computer panel and the phone sheet */
.ans { margin-top: 12px; border-radius: 15px; padding: 13px 15px; font-size: .92rem; font-weight: 600; line-height: 1.45; }
.ans b { display: block; font-size: 1.08rem; font-weight: 800; }
.ans.yes { background: var(--good-bg); color: var(--good-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 22%, transparent); }
.ans.no { background: linear-gradient(135deg, #FFF4D6, #FDEBC0); color: #5A4310; box-shadow: inset 0 0 0 1px rgb(183 129 26 / .22); }
.ans.no b { color: #3E2E08; }

/* phone sheet in "Can I afford it?" mode */
.ph .shsub { margin: 0 0 4px; font-size: .84rem; font-weight: 600; color: var(--ink-2); }
.ph .sheet .ans { margin: 0 0 10px; }
.ph .save:disabled { opacity: .45; cursor: default; }
.ph .justcheck { display: block; width: 100%; min-height: 46px; margin-top: 4px; border: none; background: none; cursor: pointer; font-weight: 700; font-size: .92rem; color: var(--ink-2); }

/* ---------- premium finish on every screen ---------- */
.desk { background: radial-gradient(120% 70% at 40% -10%, var(--bg-2) 0%, var(--bg) 60%); }
.desk .card, .ph .hero2 { background: linear-gradient(180deg, var(--card) 0%, var(--bg-2) 100%); border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgb(36 31 26 / .04), 0 26px 50px -32px color-mix(in srgb, var(--accent-d) 30%, transparent); }
.desk .space, .ph .space { box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 10px 22px -16px color-mix(in srgb, var(--accent-d) 35%, transparent); }
.desk .space .sbar > span, .ph .space .sbar > span { background-image: linear-gradient(180deg, rgb(255 255 255 / .35), rgb(255 255 255 / 0)); }
.ph .pbtn.primary, .ph .save, .desk .msave, .desk .sbtn.primary, .desk .spend-btn {
  background: linear-gradient(180deg, var(--accent), var(--accent-d)); color: var(--on-accent); border-color: transparent;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), 0 10px 20px -12px color-mix(in srgb, var(--accent-d) 70%, transparent); }
.desk .nav.on { background: linear-gradient(180deg, var(--accent), var(--accent-d)); color: var(--on-accent); }
.desk .nav.on .amt { color: rgb(255 255 255 / .8); }
.desk .side, .desk .rail { background: color-mix(in srgb, var(--panel) 88%, transparent); }
.desk .brand .mk, .ph .ava { background: linear-gradient(180deg, var(--accent), var(--accent-d)); }
.ph .peek { background: rgb(255 255 255 / .55); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .9), 0 8px 18px -14px color-mix(in srgb, var(--accent-d) 40%, transparent); }
.ph .drawer, .ph .sheet { box-shadow: 0 -20px 50px -20px rgb(36 31 26 / .25); }
.theme-sw .tdot { box-shadow: inset 0 1px 0 rgb(255 255 255 / .7); }
.theme-sw[aria-pressed='true'] { border-color: var(--accent); }
