/* SECTION: Colours and sizes | keywords: colours, variables, palette, theme, logo colours | capsule: Styles */
:root {
  --coral: #E4572E;
  --coral-dark: #C4441F;
  --gold: #F2A93B;
  --teal: #14606B;
  --teal-dark: #0D454D;
  --cream: #FFF6EC;
  --sand: #F7E9D7;
  --ink: #22313A;
  --muted: #566A73;
  --card: #FFFFFF;
  --line: #EBDCC8;
  --text: var(--ink);
  --accent: var(--coral);
  --radius: 16px;
  --shadow: 0 8px 24px rgba(34, 49, 58, 0.09);
  --wrap: 1120px;
}

/* SECTION: Base and typography | keywords: body, headings, links, buttons, base | capsule: Styles */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--teal-dark); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1em; }
a { color: var(--coral-dark); }
a:hover { color: var(--teal); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(40px, 7vw, 80px) 0; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  background: var(--coral); color: #fff;
  transition: transform .12s ease, background .15s ease;
}
.btn:hover { background: var(--coral-dark); color: #fff; transform: translateY(-1px); }
.btn.secondary { background: transparent; color: var(--teal); border-color: var(--teal); }
.btn.secondary:hover { background: var(--teal); color: #fff; }
.btn.ghost { background: #fff; color: var(--teal-dark); border-color: var(--line); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sand); color: var(--teal-dark);
  border-radius: 999px; padding: 5px 14px; font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}

/* SECTION: Site header | keywords: header, navigation, logo, menu, nav, sign in | capsule: Navigation */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 246, 236, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--teal-dark); font-weight: 800; font-size: 1.08rem; }
.brand img, .brand svg { width: 38px; height: 38px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 12px 14px; border-radius: 10px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--sand); color: var(--teal-dark); }
.nav-auth { display: flex; gap: 8px; align-items: center; margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 48px; height: 48px; align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--teal-dark); position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--teal-dark); }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.account-menu { position: relative; margin-left: 8px; }
.account-btn { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--teal); background: #fff; color: var(--teal-dark); font: inherit; font-weight: 700; cursor: pointer; }
.account-drop { position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); min-width: 200px; padding: 8px; display: none; }
.account-drop.open { display: block; }
.account-drop a, .account-drop button { display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.account-drop a:hover, .account-drop button:hover { background: var(--sand); }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 12px 20px 18px; margin: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px; }
  .nav-auth { flex-direction: column; align-items: stretch; margin: 8px 0 0; }
  .nav-auth .btn { justify-content: center; }
  .account-menu { margin: 8px 0 0; }
  .account-btn { width: 100%; justify-content: center; }
  .account-drop { position: static; box-shadow: none; border: 0; background: transparent; }
}

/* SECTION: Site footer | keywords: footer, links, about, pricing | capsule: Footer */
.site-footer { background: var(--teal-dark); color: #E8F3F4; padding: 48px 0 28px; margin-top: 0; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer a { color: #E8F3F4; text-decoration: none; display: block; padding: 6px 0; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brand { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.18); margin-top: 28px; padding-top: 18px; font-size: .9rem; color: #BFD5D8; }

/* SECTION: Home hero | keywords: hero, logo, headline, start, home | capsule: Home */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 84px) 0; background: linear-gradient(170deg, var(--cream) 0%, #FDEEDC 55%, #FBE3CF 100%); }
.hero-inner { display: grid; gap: 40px; align-items: center; grid-template-columns: 1.1fr .9fr; }
.hero h1 span { color: var(--coral); }
.hero-art { display: flex; justify-content: center; }
.hero-art svg, .hero-art img { width: 100%; max-width: 340px; height: auto; filter: drop-shadow(0 18px 30px rgba(20, 96, 107, .18)); }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; }
.hero-stats strong { display: block; font-size: 1.6rem; color: var(--teal); }

/* SECTION: Feature cards | keywords: features, icons, grid, cards | capsule: Home */
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--sand); color: var(--coral); display: grid; place-items: center; margin-bottom: 14px; }
.feature p { margin: 0; color: var(--muted); font-size: .97rem; }

/* SECTION: Steps and content blocks | keywords: how it works, steps, about, sections | capsule: Home */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; margin-bottom: 14px; }
.band { background: var(--teal); color: #EAF5F6; }
.band h2, .band h3 { color: #fff; }
.band .lede { color: #CBE2E5; }
.split { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; align-items: center; }
.list-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list-check li { display: flex; gap: 10px; align-items: flex-start; }
.list-check i { color: var(--coral); flex: none; margin-top: 3px; }

/* SECTION: Pricing plans | keywords: pricing, plans, subscribe, cost, root | capsule: Pricing */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: stretch; }
.plan { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--coral); position: relative; }
.plan.featured::after { content: "Most popular"; position: absolute; top: -13px; left: 26px; background: var(--coral); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.plan .price { font-size: 2rem; font-weight: 800; color: var(--teal-dark); }
.plan .price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan .usd { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; font-size: .95rem; }
.plan ul li { display: flex; gap: 8px; }
.plan ul i { color: var(--teal); flex: none; margin-top: 3px; }
.plan .btn { margin-top: auto; justify-content: center; }

/* SECTION: Forms and auth | keywords: forms, sign up, sign in, fields, labels | capsule: Auth */
.auth-wrap { min-height: 60vh; display: grid; place-items: center; padding: 48px 20px; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal); outline: 2px solid rgba(20,96,107,.18); }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.form-msg { border-radius: 10px; padding: 10px 14px; font-size: .93rem; margin-bottom: 14px; display: none; }
.form-msg.show { display: block; }
.form-msg.error { background: #FDECE6; color: #8C2F14; }
.form-msg.ok { background: #E5F3EC; color: #1D6B44; }

/* SECTION: Dashboard and user pages | keywords: dashboard, campaigns, cards, create, user pages | capsule: Dashboard */
.page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.stat-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 26px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat span { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat strong { font-size: 1.7rem; color: var(--teal-dark); }
.campaign-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.campaign-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.campaign-card .cover { height: 120px; background: linear-gradient(135deg, var(--teal), var(--coral)); display: grid; place-items: center; color: #fff; }
.campaign-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.campaign-card h3 { margin: 0; }
.campaign-card h3 a { text-decoration: none; color: var(--teal-dark); }
.campaign-card h3 a:hover { color: var(--coral); }
.meta { font-size: .86rem; color: var(--muted); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--sand); color: var(--teal-dark); }
.badge.live { background: #E5F3EC; color: #1D6B44; }
.badge.draft { background: #FDF0DB; color: #8A5A0B; }
.progress { height: 9px; border-radius: 999px; background: var(--sand); overflow: hidden; }
.progress > div { height: 100%; background: var(--coral); border-radius: 999px; transition: width .3s ease; }
.empty { text-align: center; padding: 50px 20px; border: 2px dashed var(--line); border-radius: var(--radius); background: #fff; }

/* SECTION: Wizard overlay | keywords: wizard, create, steps, modal, campaign | capsule: Campaign wizard */
.wizard-backdrop { position: fixed; inset: 0; background: rgba(13, 69, 77, .55); display: grid; place-items: center; padding: 16px; z-index: 100; overflow-y: auto; }
.wizard-card { background: #fff; border-radius: 20px; width: 100%; max-width: 620px; padding: 26px; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.wizard-card h2 { font-size: 1.4rem; padding-right: 40px; }
.wizard-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.1rem; cursor: pointer; color: var(--ink); }
.wizard-steps { display: flex; gap: 6px; margin-bottom: 20px; }
.wizard-steps span { height: 5px; flex: 1; border-radius: 999px; background: var(--sand); }
.wizard-steps span.on { background: var(--coral); }
.wizard-card footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.wizard-error { color: #8C2F14; font-size: .92rem; }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice { display: flex; gap: 10px; align-items: center; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--coral); background: #FFF3EC; }
.choice input { width: 20px; height: 20px; accent-color: var(--coral); }
.review-list { display: grid; gap: 10px; font-size: .95rem; }
.review-list div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.review-list dt, .review-list span:first-child { color: var(--muted); }

/* SECTION: Campaign page | keywords: campaign, hero, donate, share, reading | capsule: Campaign page */
.campaign-hero { background: linear-gradient(160deg, var(--teal), var(--teal-dark)); color: #EAF5F6; padding: clamp(36px, 6vw, 64px) 0; }
.campaign-hero h1 { color: #fff; }
.campaign-hero .lede { color: #CBE2E5; }
.campaign-body { display: grid; gap: 32px; grid-template-columns: 2fr 1fr; align-items: start; }
.campaign-body .prose { font-size: 1.06rem; }
.raise-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 88px; }

/* SECTION: Settings and billing | keywords: settings, username, password, email, billing, payments | capsule: Settings */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 16px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 48px; }
.tabs button[aria-selected="true"] { color: var(--teal-dark); border-color: var(--coral); }
.tab-panel { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.pay-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }

/* SECTION: Small screens | keywords: phone, mobile, responsive, media queries | capsule: Styles */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .hero-art { order: -1; }
  .hero-art svg, .hero-art img { max-width: 220px; }
  .split, .campaign-body { grid-template-columns: 1fr; }
  .raise-box { position: static; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .card, .plan, .auth-card, .wizard-card { padding: 20px; }
  .hero-stats { gap: 18px; }
  .btn-row .btn { width: 100%; justify-content: center; }
}

/* SECTION: Helpers and motion | keywords: visually hidden, reduced motion, helpers | capsule: Styles */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto; } }
