/* Care Coin brand (from project-care-coin.org): navy, electric blue, magenta, orange, cream; font Outfit. */
@font-face { font-family:"Outfit"; src:url("fonts/outfit.woff2") format("woff2"); font-weight:100 900; font-display:swap; }
:root {
  --bg:#f6f3ec; --card:#fffdf9; --ink:#1f2757; --text:#2b3161; --muted:#4a4f6e; --line:#e7e2d6;
  --navy:#141338; --blue:#1333fa; --blue-dark:#0c22b8; --magenta:#fa1179; --magenta-dark:#d4085f;
  --orange:#fb9b0c; --orange-soft:#fde3c1; --pink-soft:#fde0ff; --peach:#fdf0dc; --peach-ink:#6b4a12;
  --accent:var(--orange); --accent2:var(--blue); --bad:#c40d5f; --good:#1d7a4c;
}
* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--text); font:17px/1.55 "Outfit", system-ui, -apple-system, sans-serif; -webkit-font-smoothing:antialiased; }
h1, h2, h3, .brand { color:var(--ink); }
a { color:var(--blue); } a:hover { color:var(--blue-dark); }
:focus-visible { outline:3px solid var(--blue); outline-offset:3px; border-radius:4px; }
header { display:flex; flex-wrap:wrap; gap:8px 20px; align-items:center; justify-content:space-between; padding:12px 16px; background:#fff; border-bottom:4px solid var(--orange-soft); position:sticky; top:0; z-index:2; }
.brand { display:flex; align-items:center; gap:10px; font-weight:700; font-size:1.05rem; }
.brand img { height:30px; width:auto; display:block; }
.brand .pill { font-size:.72rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; background:var(--pink-soft); color:var(--magenta-dark); padding:3px 10px; border-radius:4px; }
nav { display:flex; gap:6px; flex-wrap:wrap; }
nav button { border:0; background:none; padding:8px 12px; border-radius:4px; font:inherit; cursor:pointer; color:var(--muted); }
nav button.on { background:var(--accent2); color:#fff; }
main { max-width:760px; margin:0 auto; padding:16px; }
h1 { font-size:1.6rem; margin:.4rem 0 .6rem; }
h3 { margin:0 0 .4rem; font-size:1.05rem; }
.card { background:var(--card); border:1px solid var(--line); border-radius:4px; padding:16px; margin:12px 0; }
.card p { margin:.3rem 0; }
.narrow { max-width:440px; margin:24px auto; }
.warn { border-color:#e6b9ac; background:#fff6f3; }
.grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; }
.grid2 .card { margin:0; }
.small { font-size:.88rem; color:var(--muted); }
.balance { text-align:center; background:linear-gradient(160deg,#fff8e4,#f1ebff); }
.big { font-size:3.2rem; font-weight:800; line-height:1.1; margin:.2rem 0; }
.unit { font-size:1.1rem; font-weight:600; color:var(--muted); }
.bar { height:10px; background:#eadfce; border-radius:4px; overflow:hidden; margin:10px auto; max-width:360px; }
#barfill { height:100%; background:var(--accent); width:0; transition:width .4s; }
form { display:grid; gap:12px; margin:12px 0; }
label { display:grid; gap:4px; font-weight:600; font-size:.95rem; }
input, select { font:inherit; padding:10px; border:1px solid var(--line); border-radius:4px; background:#fff; }
button { font:inherit; }
button.primary, .reward button { background:var(--accent2); color:#fff; border:0; padding:10px 14px; border-radius:4px; cursor:pointer; font-weight:600; }
button:disabled { background:#d9d3e3; color:#7d7589; cursor:not-allowed; }
.list { list-style:none; padding:0; margin:0; }
.list li { padding:6px 0; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; gap:8px; }
.list li:last-child { border:0; }
.empty { color:var(--muted); }
.reward { display:flex; flex-direction:column; gap:6px; }
.reward .emoji { font-size:2rem; }
.reward .cost { font-weight:700; color:var(--accent); }
.reward button { margin-top:auto; }
.apr { font-size:1.7rem; font-weight:800; }
.apr.neg { color:var(--bad); } .apr.pos { color:var(--good); }
.toast { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--ink); color:#fff; padding:10px 16px; border-radius:4px; z-index:5; max-width:90vw; }
button.link { background:none; border:0; color:var(--accent2); text-decoration:underline; cursor:pointer; padding:10px 6px; }
button.link.danger { color:var(--bad); padding-left:0; }
footer { padding:16px 0 28px; }
.card.soon { border-style:dashed; }
.steps { text-transform:uppercase; letter-spacing:.06em; font-weight:700; color:var(--accent2); margin:0; }
.option { border:1px solid var(--line); border-radius:4px; padding:14px; margin:12px 0; display:grid; gap:8px; }
.option.soon { border-style:dashed; }
.option h3 { margin:0; }
.dropzone { border:2px dashed var(--line); border-radius:4px; padding:16px; text-align:center; background:#fdfbf7; }
.list li.ok { color:var(--good); font-weight:600; }
#verify-next { width:100%; }
h2 { font-size:1.25rem; margin:28px 0 6px; }
a.plain { color:inherit; text-decoration:none; }
.grid3 { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; }
.grid3 .card { margin:0; }
.hero { background:linear-gradient(160deg,#fff8e4,#f1ebff); }
.step .num { display:inline-grid; place-items:center; width:28px; height:28px; border-radius:4px; background:var(--accent); color:#fff; font-weight:700; margin-bottom:6px; }
.package ul { padding-left:18px; margin:.4rem 0 0; }
.package .price { font-size:1.4rem; font-weight:800; margin:.2rem 0; }
.package.featured { border-color:var(--accent2); }
.calc { display:grid; gap:14px; margin:14px 0; }
.calc input[type=range] { padding:0; accent-color:var(--accent2); }
.totals { margin:6px 0 14px; }
.figure { font-size:1.6rem; font-weight:800; }
b.bad { color:var(--bad); font-weight:600; }
a.button-link { display:inline-block; background:var(--accent2); color:#fff; padding:10px 16px; border-radius:4px; font-weight:600; text-decoration:none; }
.badge { display:inline-block; font-size:12px; font-weight:600; padding:2px 10px; border-radius:4px; background:var(--accent2); color:#fff; }
.privacy h2 { margin-top:24px; }
#wallet-status { margin:8px 0; }
label.check { display:flex; gap:8px; align-items:flex-start; font-weight:400; margin:10px 0; }
label.check input { margin-top:5px; }
#deposit-card label, #risk-card label { margin:10px 0; }
#dep-quote-out { margin:8px 0; }
.opts { display:grid; gap:8px; margin:8px 0; }
button.opt { text-align:left; background:#fff; border:1px solid var(--line); border-radius:4px; padding:10px 12px; cursor:pointer; font:inherit; }
button.opt:hover { border-color:var(--accent2); }
.center { text-align:center; margin-top:40px; }
.error { color:var(--bad); }
.notice { background:var(--peach); color:var(--peach-ink); border:1px solid #f3d9ae; border-radius:4px; padding:10px 12px; }
#signout { margin-left:auto; }
[hidden] { display:none !important; }
.card.reward.picked { border-color:var(--accent2); box-shadow:0 0 0 1px var(--accent2) inset; }
.card.reward button.link { align-self:center; padding:4px; }
.thanks { text-align:center; background:linear-gradient(160deg,#fff8e4,#f1ebff); }
.thanks .emoji { font-size:2.4rem; }
.thanks .list { text-align:left; max-width:420px; margin:8px auto 0; }
#send-choices { width:100%; margin-top:8px; }

/* Brand touches */
button.primary, .reward button:not(.link), a.button-link { background:var(--blue); border-radius:4px; padding:11px 20px; transition:background .15s; }
button.primary:hover:not(:disabled), .reward button:not(.link):hover:not(:disabled), a.button-link:hover { background:var(--magenta); color:#fff; }
nav button.on { background:var(--blue); }
nav button { font-weight:600; }
.card { border-radius:4px; }
.balance, .hero, .thanks { background:linear-gradient(160deg,var(--pink-soft),var(--peach)); border-color:transparent; }
.big { color:var(--ink); }
.reward .cost { color:var(--magenta-dark); }
.badge { background:var(--magenta); }
.steps { color:var(--magenta-dark); }
.step .num { background:var(--magenta); }
#barfill { background:linear-gradient(90deg,var(--orange),var(--magenta)); }
.apr.pos { color:var(--good); } .apr.neg { color:var(--bad); }
button.primary:disabled, .reward button:not(.link):disabled { background:#e4e1ec; color:#6e6a85; }
.card.reward.picked { border-color:var(--blue); box-shadow:0 0 0 1px var(--blue) inset; }
.card.reward button.link { background:none; color:var(--blue); }
/* Start page: big photo hero. The photo fills the right side and fades into navy on the left,
   which also keeps the garbled text on the monitor in the photo out of view. */
.hero-login { position:relative; overflow:hidden; width:100vw; margin:-16px 0 0 calc(50% - 50vw); min-height:calc(100vh - 70px); display:flex; align-items:center; background:var(--navy); }
.hero-login::before { content:""; position:absolute; top:0; right:0; bottom:0; width:60%;
  background:linear-gradient(90deg, var(--navy) 0%, rgba(20,19,56,.55) 18%, rgba(20,19,56,0) 45%), url("img/hero-desk.jpg") 60% center / cover no-repeat; }
.hero-inner { position:relative; width:100%; max-width:1180px; margin:0 auto; padding:48px 24px; }
.hero-text, .login-card { max-width:420px; }
.hero-text { color:#fff; margin-bottom:24px; }
.hero-text h1 { color:#fff; font-size:clamp(2.1rem, 4.6vw, 3.4rem); line-height:1.05; margin:.2rem 0 .8rem; font-weight:800; }
.hero-text .lead { font-size:clamp(1.25rem, 2.4vw, 1.6rem); font-weight:600; color:var(--orange-soft); margin:0 0 1rem; }
.hero-text p { color:#e9e7f5; }
.hero-text b { color:#fff; }
.eyebrow { text-transform:uppercase; letter-spacing:.12em; font-weight:700; font-size:.8rem; color:var(--magenta) !important; margin:0; }
.login-card { background:var(--card); border-radius:4px; padding:18px; box-shadow:0 18px 40px rgba(10,10,40,.35); }
.login-card form { margin:12px 0 6px; }
@media (max-width:700px) {
  .hero-login { min-height:0; display:block; }
  .hero-login::before { width:100%; bottom:auto; height:340px;
    background:linear-gradient(180deg, rgba(20,19,56,0) 60%, var(--navy) 100%), url("img/hero-desk.jpg") right center / cover no-repeat; }
  .hero-inner { padding:300px 18px 28px; }
}

/* ---- App pages: same look as the start page ---- */
body { background:var(--bg); }
footer { background:var(--navy); color:#c9c6e0; margin-top:40px; padding:22px 16px 30px; }
footer a { color:#fff; }
nav button { border-radius:4px; }
nav button:hover:not(.on) { background:var(--pink-soft); color:var(--magenta-dark); }
h1 { font-weight:800; letter-spacing:-.01em; }

/* Navy heading block at the top of each tab, optionally with a photo fading in from the right */
.page-head, .hero-card { position:relative; overflow:hidden; background:var(--navy); color:#e9e7f5; border-radius:4px; padding:26px 22px; margin:8px 0 16px; border:0; }
.page-head h1, .hero-card h1 { color:#fff; font-size:clamp(1.7rem, 4vw, 2.3rem); margin:.15rem 0 .5rem; }
.page-head p, .hero-card p { color:#e9e7f5; max-width:440px; position:relative; }
.page-head b, .hero-card b { color:#fff; }
.page-head > *, .hero-card > * { position:relative; }
.photo-quiet::before, .photo-superhero::before { content:""; position:absolute; inset:0 0 0 auto; width:50%; z-index:0;
  background:var(--img) center 25% / cover no-repeat;
  -webkit-mask-image:linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 35%, #000 70%); mask-image:linear-gradient(90deg, transparent 0%, rgba(0,0,0,.55) 35%, #000 70%); }
.page-head > p, .hero-card > p, .hero-card .small { max-width:min(440px, 55%); }
.photo-quiet { --img:url("img/photo-quiet-moment.jpg"); }
.photo-superhero { --img:url("img/photo-superhero.jpg"); }

/* Home balance */
.card.balance.hero-card { text-align:left; background:var(--navy); }
.hero-card .small { color:#c9c6e0; }
.hero-card #hello { color:var(--orange-soft); font-weight:600; font-size:1rem; }
.hero-card .big { color:#fff; font-size:3.6rem; }
.hero-card .unit { color:var(--orange-soft); }
.hero-card .bar { background:rgba(255,255,255,.15); margin:12px 0; max-width:340px; }

/* Onboarding cards: photo across the top */
.card.onboard { padding-top:0; overflow:hidden; }
.card-photo { display:block; width:calc(100% + 32px); margin:0 -16px 14px; height:170px; object-fit:cover; object-position:center 30%; }

/* Reward cards */
.reward .emoji { display:grid; place-items:center; width:56px; height:56px; border-radius:4px; background:var(--pink-soft); font-size:1.8rem; }
.reward .cost { display:inline-block; align-self:flex-start; background:var(--orange-soft); color:var(--peach-ink); padding:2px 12px; border-radius:4px; font-size:.9rem; }
.reward h3 { margin-top:4px; }
.card { box-shadow:0 2px 0 rgba(20,19,56,.04); }
.card h3 { color:var(--ink); }
@media (max-width:560px) {
  .photo-quiet::before, .photo-superhero::before { width:100%; opacity:.3; }
  .page-head > p, .hero-card > p, .hero-card .small { max-width:none; }
}
footer, footer.small { color:#c9c6e0; }
body { display:flex; flex-direction:column; min-height:100vh; }
main { flex:1; width:100%; }
.option .badge, .card.soon .badge { justify-self:start; }
.photo-quiet h1, .photo-superhero h1 { max-width:min(520px, 62%); } @media (max-width:560px) { .photo-quiet h1, .photo-superhero h1 { max-width:none; } }
.way { display:flex; flex-direction:column; gap:6px; }
.way .num { display:inline-grid; place-items:center; width:28px; height:28px; border-radius:4px; background:var(--magenta); color:#fff; font-weight:700; }
.way.featured { border-color:var(--blue); }
.way ul:not(.list) { padding-left:18px; margin:.2rem 0; }
#reward-list li { flex-direction:column; gap:0; }
#reward-list .muted { color:var(--muted); font-size:.85rem; }
.benefits { padding-left:18px; margin:0; display:grid; gap:8px; }
.reward .sponsor { font-size:.82rem; color:var(--muted); margin:2px 0 4px; display:flex; flex-wrap:wrap; align-items:center; gap:4px; }
.reward .offer { background:var(--pink-soft); color:var(--magenta-dark); font-weight:700; padding:1px 8px; border-radius:4px; font-size:.75rem; }
.reward .demo-tag { border:1px dashed var(--line); color:var(--muted); padding:0 6px; border-radius:4px; font-size:.7rem; text-transform:uppercase; letter-spacing:.04em; }
.together { background:linear-gradient(160deg,var(--pink-soft),var(--peach)); border-color:transparent; display:grid; gap:8px; }
.together .together-btn { justify-self:start; }
.together .together-done { color:var(--good); font-weight:600; }
.together .together-done .link { font-weight:400; }
.way.learning { margin-top:12px; }
.page-head .sponsor-line { font-size:.85rem; color:var(--orange-soft); margin-top:10px; }
.page-head .demo-tag { border:1px dashed rgba(255,255,255,.4); color:#c9c6e0; padding:0 6px; border-radius:4px; font-size:.7rem; text-transform:uppercase; letter-spacing:.04em; }

/* ---- Less generic: flat colours, small corners, no shadows, photos as full backgrounds ---- */
.card, .login-card { box-shadow:none; }
.balance, .hero, .thanks { background:var(--pink-soft); }
.together { background:var(--card); border:1px solid var(--line); border-left:4px solid var(--magenta); }
.card.done { border-left:4px solid var(--good); }
.card.done h3::after { content:" · completed"; color:var(--good); font-weight:600; font-size:.85rem; }
h1, h2 { letter-spacing:-.015em; }
.photo-quiet::before, .photo-superhero::before { inset:0; width:auto; -webkit-mask-image:none; mask-image:none; opacity:1;
  background:linear-gradient(90deg, rgba(20,19,56,.96) 0%, rgba(20,19,56,.82) 45%, rgba(20,19,56,.35) 100%), var(--img) center 30% / cover no-repeat; }
.card.onboard { padding-top:16px; }
.bg-quiet { --bg-img:url("img/photo-quiet-moment.jpg"); }
.bg-laughing { --bg-img:url("img/hero-desk.jpg"); }
.onboard::before { content:""; position:fixed; inset:0; z-index:-1;
  background:linear-gradient(rgba(20,19,56,.72), rgba(20,19,56,.72)), var(--bg-img) center / cover no-repeat; }
@media (max-width:560px) {
  .photo-quiet::before, .photo-superhero::before { opacity:1; background:linear-gradient(rgba(20,19,56,.85), rgba(20,19,56,.85)), var(--img) center 30% / cover no-repeat; }
}

/* Serif for big headings: Fraunces (SIL Open Font License, see fonts/FRAUNCES-LICENSE.txt), stored with the app. */
@font-face { font-family:"Fraunces"; src:url("fonts/fraunces.woff2") format("woff2"); font-weight:100 900; font-style:normal; font-display:swap; }
@font-face { font-family:"Fraunces"; src:url("fonts/fraunces-italic.woff2") format("woff2"); font-weight:100 900; font-style:italic; font-display:swap; }
:root { --serif:"Fraunces", Georgia, serif; }
h1, h2, .hero-text h1, .page-head h1 { font-family:var(--serif); font-weight:600; letter-spacing:-.01em; }
.hero-text h1 { font-size:clamp(2.3rem, 5.2vw, 3.8rem); line-height:1.02; }
.hero-text .lead { font-family:var(--serif); font-style:italic; font-weight:400; }

/* ---- Photos as full-page backgrounds (app tabs and sponsor page) ---- */
body:has(#home:not([hidden])) { --page-img:url("img/photo-superhero.jpg"); }
body:has(#rewards:not([hidden])) { --page-img:url("img/photo-quiet-moment.jpg"); }
body:has(#learn:not([hidden])) { --page-img:url("img/bg-armchair.jpg"); }
body:has(#yield:not([hidden])) { --page-img:url("img/bg-standing-phone.jpg"); }
body.photo-page { --page-img:url("img/bg-father.jpg"); }
:is(body:has(.tab:not([hidden])), body.photo-page)::before { content:""; position:fixed; inset:0; z-index:-1;
  background:linear-gradient(rgba(20,19,56,.78), rgba(20,19,56,.78)), var(--page-img) center 30% / cover no-repeat; }
/* The boxes no longer carry their own photo; they sit on the page photo, slightly see-through. */
.photo-quiet::before, .photo-superhero::before { display:none; }
.page-head, .card.balance.hero-card { background:rgba(20,19,56,.55); border:1px solid rgba(255,255,255,.12); }
/* Text that sits straight on the photo turns light */
:is(body:has(.tab:not([hidden])), body.photo-page) main :is(h1, h2, h3, p, li):not(.card *, .page-head *, .hero-card *, .notice, .notice *) { color:#f0eef8; }
:is(body:has(.tab:not([hidden])), body.photo-page) main a:not(.card *, .button-link) { color:#fff; }

/* ---- Lighter photos ---- */
:is(body:has(.tab:not([hidden])), body.photo-page)::before {
  background:linear-gradient(rgba(20,19,56,.45), rgba(20,19,56,.45)), var(--page-img) center 30% / cover no-repeat; }
.onboard::before { background:linear-gradient(rgba(20,19,56,.42), rgba(20,19,56,.42)), var(--bg-img) center / cover no-repeat; }
.page-head, .card.balance.hero-card { background:rgba(20,19,56,.68); }
:is(body:has(.tab:not([hidden])), body.photo-page) main :is(h1, h2, h3, p, li):not(.card *, .page-head *, .hero-card *, .notice, .notice *) { text-shadow:0 1px 3px rgba(0,0,0,.6); }

/* ---- Simple header: no coloured edge, quiet menu links ---- */
header { border-bottom:1px solid var(--line); }
nav { gap:2px; }
nav button, nav button.on { background:none; color:var(--muted); font-weight:500; border-radius:0; padding:8px 12px; border-bottom:2px solid transparent; }
nav button:hover:not(.on) { background:none; color:var(--ink); }
nav button.on { color:var(--ink); border-bottom-color:var(--ink); }
header > a.small { color:var(--muted); text-decoration:none; }
header > a.small:hover { color:var(--ink); }
#signout { color:var(--muted); text-decoration:none; font-weight:500; } #signout:hover { color:var(--ink); }
.brand img { height:36px; }
.risk-box { border:1px solid var(--line); border-left:4px solid var(--bad); background:#fff; padding:10px 12px; margin:10px 0; }
.risk-box ul { padding-left:18px; margin:6px 0; display:grid; gap:4px; }
.soon .badge { background:var(--muted); }
/* Sponsor call-to-action on the start page */
.sponsor-cta { margin-top:28px; padding-top:18px; border-top:1px solid rgba(255,255,255,.35); }
.sponsor-cta p { margin:0 0 10px; font-family:var(--serif); font-size:1.25rem; color:#fff; }
.cta-btn { display:inline-block; padding:10px 18px; border:2px solid #fff; border-radius:4px; color:#fff; font-weight:600; text-decoration:none; }
.cta-btn:hover { background:#fff; color:var(--ink); }
/* Sponsor box sits on the photo, bottom right, opposite the login */
.sponsor-cta { position:absolute; right:24px; bottom:48px; margin:0; padding:18px 22px; border:0; background:rgba(20,19,56,.55); border-radius:4px; text-align:left; }
@media (max-width:700px) { .sponsor-cta { position:static; margin-top:20px; background:none; padding:16px 0 0; border-top:1px solid rgba(255,255,255,.35); } }
/* No white gap between the start photo and the footer */
body:has(#login:not([hidden])) footer { margin-top:0; }
body:has(#login:not([hidden])) main { padding-bottom:0; margin-bottom:0; }
/* Sponsor box close to the right edge of the screen, not of the content column */
@media (min-width:701px) { .sponsor-cta { right:min(16px, calc(606px - 50vw)); } }
/* Phone header: logo and "Sign out" / "Back to the app" on one line, menu below */
@media (max-width:700px) {
  .brand img { height:28px; }
  header .brand { order:1; }
  #signout, header > a.small { order:2; margin-left:auto; }
  nav { order:3; width:100%; justify-content:space-between; }
}
/* Keep long dropdown options from pushing boxes off narrow screens */
select, input { max-width:100%; min-width:0; }
.option, .option label { min-width:0; }
select { width:100%; text-overflow:ellipsis; }
