/* Split Mudra website. Dark by default (data-theme="dark" on <html>); the
   button in the header switches to light and back, and remembers it.
   Colours are the app's own (mobile/lib/core/theme):
   lavender page and panels, deep-violet ink, the teal accent for things you
   act on, and the lavender-pink-peach wash behind the hero. */

:root {
  color-scheme: light;
  --ground: #fbf9ff;
  --panel: #ffffff;
  --ink: #2a2350;
  --muted: #635c86;
  --hairline: #efeafb;
  --border: #e2dcf6;
  --primary: #5a45b8;
  --primary-tint: #e9e4fb;
  --on-primary-tint: #2a2350;
  --brand: #0f8a6e;
  --on-brand: #ffffff;
  --brand-tint: #d6f0e4;
  --on-brand-tint: #14503a;
  --positive: #157f58;
  --negative: #be3455;
  --wash-1: #cfc6f7;
  --wash-2: #ebcde9;
  --wash-3: #f8d9c5;
  --shadow: 0 1px 2px rgba(42, 35, 80, .06), 0 8px 24px rgba(42, 35, 80, .08);
  --shadow-lg: 0 2px 6px rgba(42, 35, 80, .08), 0 24px 60px rgba(42, 35, 80, .16);
  --radius: 16px;
  --radius-lg: 24px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Noto Sans Gujarati", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #17132b;
  --panel: #211b3d;
  --ink: #ede9f8;
  --muted: #a9a2c9;
  --hairline: #322a54;
  --border: #3a3163;
  --primary: #c3b6f5;
  --primary-tint: #3a2f63;
  --on-primary-tint: #e5defb;
  --brand: #2fb596;
  --on-brand: #04261e;
  --brand-tint: #1b3a2e;
  --on-brand-tint: #bfefd2;
  --positive: #6fd9a8;
  --negative: #f2a0b4;
  --wash-1: #3a2f63;
  --wash-2: #4a2f55;
  --wash-3: #5a3a46;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 60px rgba(0, 0, 0, .45);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* ---- header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--hairline); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }

.brandmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.brandmark img { width: 40px; height: 40px; }
.brandmark .m { color: var(--brand); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { color: var(--ink); background: var(--primary-tint); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel); color: var(--ink);
  cursor: pointer; flex: none;
}
.theme-toggle:hover { background: var(--primary-tint); }
.theme-toggle svg { width: 20px; height: 20px; }
/* Shows what a click will switch to: the sun in dark mode, the moon in light. */
.theme-toggle .i-sun, .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun,
:root:not([data-theme="dark"]) .theme-toggle .i-moon { display: block; }

@media (max-width: 760px) {
  .nav { display: none; }
  .site-header .theme-toggle { margin-left: auto; }
}

/* ---- buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 10px 20px; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--primary-tint); }

.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 20px 8px 16px; border-radius: 14px;
  background: var(--ink); color: var(--ground); text-decoration: none;
  border: 1px solid var(--ink);
}
.store svg { width: 26px; height: 26px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store small { font-size: .72rem; font-weight: 600; opacity: .8; letter-spacing: .02em; }
.store b { font-size: 1.05rem; }
.store[aria-disabled="true"] { cursor: default; }
.store:not([aria-disabled="true"]):hover { filter: brightness(1.15); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- hero ------------------------------------------------------------ */
.hero { position: relative; padding: 56px 0 72px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 120%; z-index: -1;
  background:
    radial-gradient(60% 60% at 15% 20%, var(--wash-1), transparent 70%),
    radial-gradient(50% 55% at 85% 15%, var(--wash-2), transparent 70%),
    radial-gradient(55% 60% at 70% 85%, var(--wash-3), transparent 70%);
  opacity: .9;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px; font-size: .88rem; font-weight: 700;
  background: color-mix(in srgb, var(--panel) 70%, transparent); color: var(--primary);
  border: 1px solid var(--border);
}
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; margin-bottom: 28px; }
.hero .lead strong { color: var(--ink); font-weight: 650; }
.hero-note { margin-top: 14px; font-size: .92rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero { padding-top: 32px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero .visual { order: 2; }
}

/* ---- the phone ------------------------------------------------------- */
.visual { display: flex; justify-content: center; }
.phone {
  width: min(320px, 86vw); border-radius: 44px; padding: 12px;
  background: #1c1733; box-shadow: var(--shadow-lg);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  transform: rotate(-2deg);
}
.screen {
  border-radius: 34px; overflow: hidden; background: var(--ground);
  font-size: 13px; line-height: 1.4; min-height: 560px; display: flex; flex-direction: column;
}
.screen-top { display: flex; justify-content: space-between; padding: 14px 22px 6px; font-size: 11px; font-weight: 700; color: var(--muted); }
.screen-head { display: flex; align-items: center; gap: 10px; padding: 8px 18px 12px; }
.screen-head .avatar { width: 36px; height: 36px; border-radius: 12px; background: var(--primary-tint); display: grid; place-items: center; font-size: 18px; }
.screen-head b { display: block; font-size: 15px; }
.screen-head small { color: var(--muted); font-size: 11px; }
.balance-card {
  margin: 0 14px 12px; padding: 16px; border-radius: 20px;
  background: var(--brand); color: var(--on-brand);
}
.balance-card small { opacity: .85; font-size: 11px; font-weight: 600; }
.balance-card .amt { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0 10px; }
.balance-card .row { display: flex; gap: 8px; }
.balance-card .chip { flex: 1; text-align: center; padding: 7px 4px; border-radius: 12px; font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--on-brand) 16%, transparent); }
.list { margin: 0 14px; background: var(--panel); border-radius: 18px; border: 1px solid var(--hairline); overflow: hidden; }
.item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-top: 1px solid var(--hairline); }
.item:first-child { border-top: 0; }
.item .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-tint); font-size: 16px; flex: none; }
.item .t { flex: 1; min-width: 0; }
.item .t b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t small { color: var(--muted); font-size: 11px; }
.item .v { text-align: right; font-weight: 700; font-size: 12px; white-space: nowrap; }
.item .v small { display: block; font-weight: 600; font-size: 10px; color: var(--muted); }
.pos { color: var(--positive); }
.neg { color: var(--negative); }
.screen-bar { margin-top: auto; display: flex; justify-content: space-around; align-items: center; padding: 10px 8px 16px; border-top: 1px solid var(--hairline); background: var(--panel); }
.screen-bar span { width: 26px; height: 6px; border-radius: 4px; background: var(--hairline); }
.screen-bar .plus { width: 44px; height: 44px; border-radius: 16px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; font-size: 24px; font-weight: 700; }

/* ---- sections -------------------------------------------------------- */
section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.kicker { display: block; color: var(--brand); font-weight: 800; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.alt { background: var(--panel); border-block: 1px solid var(--hairline); }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.alt .card { background: var(--ground); box-shadow: none; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.icon {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--primary-tint); color: var(--primary); margin-bottom: 16px;
}
.icon svg { width: 24px; height: 24px; }
.icon.teal { background: var(--brand-tint); color: var(--on-brand-tint); }

.uses .card { text-align: left; }
.uses .emoji { font-size: 30px; line-height: 1; margin-bottom: 12px; }

/* steps */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 64px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
  background: var(--brand); color: var(--on-brand);
}

/* splitwise band */
.band {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  padding: 36px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--wash-1), var(--wash-2) 55%, var(--wash-3));
  color: var(--ink);
}
.band h2 { margin-bottom: .3em; }
.band p { margin: 0; color: var(--ink); opacity: .85; max-width: 46em; }
.band .pill { padding: 10px 18px; border-radius: 999px; background: var(--panel); font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; padding: 28px 22px; } }

/* plans */
.plan { display: flex; flex-direction: column; }
.plan h3 { font-size: 1.35rem; }
.plan .tag { align-self: flex-start; font-size: .8rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; background: var(--primary-tint); color: var(--on-primary-tint); }
.plan.premium { border-color: color-mix(in srgb, var(--brand) 45%, var(--hairline)); }
.plan.premium .tag { background: var(--brand-tint); color: var(--on-brand-tint); }
.ticks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; color: var(--ink); font-size: .98rem; }
.ticks li::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 999px;
  background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f8a6e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.fineprint { color: var(--muted); font-size: .9rem; margin-top: 18px; }

/* faq */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 0 22px; }
.alt .faq details { background: var(--ground); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 32px 18px 0; position: relative;
  font-weight: 700; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 500; color: var(--primary);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* closing cta */
.cta { text-align: center; }
.cta .stores { justify-content: center; margin-top: 24px; }
.cta img { width: 84px; height: 84px; margin: 0 auto 18px; }

/* footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 36px 0 44px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---- legal pages ----------------------------------------------------- */
.legal { padding: 48px 0 80px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal .updated { color: var(--muted); margin-bottom: 32px; }
.legal h2 { font-size: 1.4rem; margin-top: 2.2em; padding-top: .2em; }
.legal h3 { margin-top: 1.4em; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: .45em; }
.legal .summary { background: var(--primary-tint); color: var(--on-primary-tint); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 8px; }
.legal .summary ul { margin: .4em 0 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1em 0 1.4em; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--hairline); }
.legal th { font-weight: 700; }
.legal .toc { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 18px 24px; margin: 24px 0; }
.legal .toc ol { margin: .4em 0 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
@media (max-width: 620px) { .legal .toc ol { columns: 1; } }
mark.todo { background: #ffe58a; color: #3a2a00; padding: 0 4px; border-radius: 4px; }

/* The logo's navy figure needs a light backing on dark backgrounds. */
:root[data-theme="dark"] .mark-chip { background: #ede9f8; border-radius: 30%; padding: 3px; }

/* small helpers */
.pt0 { padding-top: 0; }
.muted { color: var(--muted); }
.notfound { text-align: center; padding: 60px 0; }
.notfound img { width: 96px; height: 96px; margin: 0 auto 20px; }
