/* Expense Ex — shared styles. Theme follows OS setting via prefers-color-scheme. */

:root {
  --bg: #F5F8F6;
  --surface: #FFFFFF;
  --surface-alt: #EEF3F0;
  --border: #E4EBE6;
  --border-strong: #D7E1DB;

  --text: #12314F;
  --text-muted: #5A6B7B;
  --text-faint: #8695A5;

  --primary: #178A46;
  --primary-dark: #0F6D37;
  --primary-light: #22A24C;

  --navy: #12314F;
  --navy-dark: #0d243c;

  --chip-bg: #E6F5EC;
  --chip-text: #178A46;

  --warning-bg: #FEF3E2;
  --warning-border: #F8E4C4;
  --warning-text: #8a6420;

  --shadow-sm: 0 1px 3px rgba(18, 49, 79, .06);
  --shadow-md: 0 4px 14px rgba(18, 49, 79, .12);
  --shadow-lg: 0 14px 34px -8px rgba(23, 138, 70, .35);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1420;
    --surface: #121e2e;
    --surface-alt: #16222f;
    --border: #223142;
    --border-strong: #2c3d50;

    --text: #e8eef4;
    --text-muted: #a9bacb;
    --text-faint: #7c8ea1;

    --primary: #2FB558;
    --primary-dark: #23a34a;
    --primary-light: #34c964;

    --navy: #0d1926;
    --navy-dark: #060d15;

    --chip-bg: rgba(52, 182, 92, .16);
    --chip-text: #8fe3a8;

    --warning-bg: #241c10;
    --warning-border: #4a3a1c;
    --warning-text: #e8c37a;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .4);
    --shadow-lg: 0 14px 34px -8px rgba(23, 138, 70, .5);

    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.wrap-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.brand-name {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -.4px;
  color: var(--text);
}

.brand-name span { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 10px;
  flex-shrink: 0;
}
.menu-toggle:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.menu-toggle .icon-close { display: none; }
.menu-toggle.open .icon-menu { display: none; }
.menu-toggle.open .icon-close { display: block; }

@media (max-width: 720px) {
  .site-header .wrap { position: relative; flex-wrap: wrap; }
  .menu-toggle { display: inline-flex; order: 3; }
  .header-actions {
    order: 4;
    flex-basis: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 10px 20px 16px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height .22s ease, opacity .18s ease;
  }
  .header-actions.open { max-height: 320px; opacity: 1; pointer-events: auto; }
  .header-actions .btn { width: 100%; justify-content: center; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 11px;
  padding: 9px 16px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-ghost { color: var(--text-muted); background: transparent; padding: 9px 12px; }
.btn-ghost:hover { color: var(--primary); }

.btn-navy { background: var(--navy); color: #fff; box-shadow: var(--shadow-md); }
.btn-navy:hover { background: var(--navy-dark); color: #fff; }

.btn-primary {
  background: linear-gradient(180deg, #2FB558, #178A46);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.btn-primary:hover { filter: brightness(1.06); color: #fff; }

.btn-large { padding: 16px 26px; border-radius: 16px; font-size: 17px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 90% at 85% 0%, #173a5e 0%, #0f2c4c 45%, #0b2440 100%);
  color: #fff;
}

.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.hero::before {
  top: -140px; right: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(52,182,92,.35), transparent 70%);
}

.hero::after {
  bottom: -160px; left: -100px; width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(125,194,66,.18), transparent 70%);
}

.hero-inner {
  position: relative;
  padding: clamp(48px, 7vw, 84px) 20px clamp(56px, 7vw, 88px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}

.hero-copy { flex: 1 1 340px; min-width: 300px; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(52,182,92,.16);
  border: 1px solid rgba(52,182,92,.32);
  color: #8fe3a8;
  padding: 6px 13px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2px;
}

.hero h1 {
  font-size: clamp(34px, 5.4vw, 54px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -1.4px;
  margin: 22px 0 0;
}

.hero h1 .accent {
  background: linear-gradient(90deg, #7DC242, #34B65C);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  font-size: clamp(16px, 2vw, 18.5px);
  line-height: 1.6;
  color: #b6c6d8;
  margin: 20px 0 0;
  max-width: 460px;
}

.download-block {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.download-btn-label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.download-btn-label .small { font-size: 12px; font-weight: 600; opacity: .85; }

.download-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13.5px;
  color: #9fb2c6;
}

.download-meta .row { display: flex; align-items: center; gap: 7px; }
.download-meta .ver { color: #7DC242; font-weight: 700; }
.download-meta .dot { opacity: .5; }

.disclaimer {
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 13px;
  padding: 13px 15px;
  max-width: 480px;
}

.disclaimer p { margin: 0; font-size: 13px; line-height: 1.55; color: #c3d0de; }
.disclaimer a { color: #8fe3a8; font-weight: 600; }

.ios-callout {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 15px;
  padding: 16px 18px;
  max-width: 520px;
}

.ios-callout-text { flex: 1 1 220px; }

.ios-callout-title { font-weight: 700; font-size: 14.5px; color: #fff; }

.ios-callout-text p { margin: 4px 0 0; font-size: 13px; line-height: 1.55; color: #c3d0de; }
.ios-callout-text a { color: #8fe3a8; font-weight: 600; }

.ios-callout .btn { flex-shrink: 0; }

.hero-visual { flex: 0 1 300px; min-width: 240px; display: flex; justify-content: center; }

.phone {
  width: clamp(230px, 60vw, 280px);
  aspect-ratio: 9/19;
  border-radius: 38px;
  background: #0a1a2e;
  padding: 9px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: var(--surface-alt);
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.phone-screen .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity .9s ease;
  pointer-events: none;
  -webkit-user-drag: none;
}

.phone-screen .slide.active { opacity: 1; }

.slide-dots {
  position: absolute;
  bottom: 13px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 2px;
  z-index: 3;
}

.slide-dots span {
  height: 6px;
  width: 6px;
  border-radius: 100px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  opacity: .5;
  cursor: pointer;
  padding: 6px 4px;
  background-clip: content-box;
  box-sizing: content-box;
  transition: all .5s ease;
}

.slide-dots span.active { width: 16px; opacity: 1; }

/* ===== Sections ===== */
section.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 88px) 20px 0;
}

.section-head { text-align: center; max-width: 560px; margin: 0 auto; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--primary);
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 12px 0 0;
  color: var(--text);
}

/* ===== Feature cards ===== */
.feature-grid {
  margin-top: clamp(36px, 5vw, 52px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--chip-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
}

.card h3 {
  font-size: 18.5px;
  font-weight: 700;
  margin: 18px 0 0;
  color: var(--text);
  letter-spacing: -.3px;
}

.card p { font-size: 14.5px; line-height: 1.6; color: var(--text-muted); margin: 9px 0 0; }

/* ===== Changelog ===== */
.changelog-wrap { max-width: 820px; margin: 0 auto; padding: 0 20px; }

.changelog {
  margin-top: 28px;
  position: relative;
}

.changelog::before {
  content: "";
  position: absolute;
  left: 8px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--primary-light), var(--border));
}

.release { position: relative; padding: 0 0 26px 34px; }

.release-dot {
  position: absolute;
  left: 0; top: 5px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--primary-light);
  box-shadow: 0 0 0 4px var(--bg);
}

.release-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.release-head .v { font-weight: 800; font-size: 18px; color: var(--text); }
.release-head .date { font-size: 13px; color: var(--text-faint); }

.badge-latest {
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 100px;
  letter-spacing: .4px;
}

.release ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.release li {
  display: flex;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
}

.release li::before {
  content: "\203A";
  color: var(--primary);
  flex-shrink: 0;
  font-weight: 700;
}

/* ===== Install steps ===== */
.install-panel {
  max-width: 820px;
  margin: 0 auto;
  background: var(--navy);
  border-radius: 26px;
  padding: clamp(30px, 5vw, 48px);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.install-panel::before {
  content: "";
  position: absolute;
  top: -80px; right: -60px; width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52,182,92,.28), transparent 70%);
}

.install-panel .inner { position: relative; }

.install-panel .eyebrow { color: #7DC242; }

.install-panel h2 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  letter-spacing: -.8px;
  margin: 12px 0 6px;
}

.install-panel > .inner > p {
  font-size: 15px;
  line-height: 1.6;
  color: #b6c6d8;
  margin: 0 0 30px;
  max-width: 520px;
}

.steps { display: flex; flex-direction: column; gap: 14px; }

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  padding: 16px 18px;
}

.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2FB558, #178A46);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  color: #fff;
}

.step-title { font-weight: 700; font-size: 16px; }
.step-body { font-size: 14px; line-height: 1.55; color: #b6c6d8; margin-top: 4px; }

/* ===== Footer ===== */
.site-footer {
  margin-top: clamp(56px, 8vw, 90px);
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}

.footer-top {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 52px) 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand { max-width: 320px; }

.footer-brand p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 14px 0 0;
}

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

.footer-links .title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.footer-links a { font-size: 14px; color: var(--text-muted); }
.footer-links a:hover { color: var(--primary); }

.footer-bottom { border-top: 1px solid var(--border); }

.footer-bottom-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ===== Help page ===== */
.help-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) 20px clamp(20px, 3vw, 28px);
}

.help-hero h1 {
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin: 18px 0 0;
  color: var(--text);
}

.help-hero p {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.6;
  color: var(--text-muted);
  margin: 14px 0 0;
  max-width: 600px;
}

.help-nav {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.help-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 600;
}

.help-nav a:hover { border-color: var(--primary); color: var(--primary); }

.help-body { max-width: 900px; margin: 0 auto; padding: 0 20px; }

.help-group { scroll-margin-top: 78px; padding-top: clamp(34px, 5vw, 48px); }

.help-group-head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 18px;
}

.help-group-icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  background: var(--chip-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.help-group-head h2 {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 800;
  letter-spacing: -.6px;
  margin: 0;
  color: var(--text);
}

.help-group-head .sub { font-size: 13px; color: var(--text-faint); margin-top: 2px; }

.accordion { display: flex; flex-direction: column; gap: 12px; }

.accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.accordion-trigger .q {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.accordion-item.open .accordion-trigger .q { color: var(--primary); }

.accordion-chev {
  flex-shrink: 0;
  transition: transform .25s ease;
  color: var(--primary);
}

.accordion-item.open .accordion-chev { transform: rotate(180deg); }

.accordion-panel {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
}

.accordion-item.open .accordion-panel { display: block; }

.accordion-panel-inner {
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-panel-inner p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-muted);
}

.accordion-panel-inner ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion-panel-inner ul li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.accordion-panel-inner ul li::before {
  content: "\203A";
  color: var(--primary);
  flex-shrink: 0;
  font-weight: 700;
  margin-top: 1px;
}

.accordion-panel-inner ul li strong { color: var(--text); }

.accordion-panel-inner ol {
  margin: 0;
  padding: 0 0 0 4px;
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.accordion-panel-inner ol li {
  counter-increment: steps;
  display: flex;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.accordion-panel-inner ol li::before {
  content: counter(steps);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* Contact panel (help page) */
.contact-panel {
  margin-top: clamp(40px, 6vw, 64px);
  background: var(--navy);
  border-radius: 24px;
  padding: clamp(28px, 5vw, 44px);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.contact-panel::before {
  content: "";
  position: absolute;
  top: -80px; right: -60px; width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52,182,92,.28), transparent 70%);
}

.contact-panel .inner { position: relative; }
.contact-panel .eyebrow { color: #7DC242; }

.contact-panel h2 {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -.8px;
  margin: 12px 0 8px;
}

.contact-panel > .inner > p {
  font-size: 15px;
  line-height: 1.6;
  color: #b6c6d8;
  margin: 0 0 24px;
  max-width: 540px;
}

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

.btn-outline-light {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  padding: 14px 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
}
.btn-outline-light:hover { background: rgba(255,255,255,.14); color: #fff; }

.btn-whatsapp {
  background: linear-gradient(180deg, #2FB558, #178A46);
  color: #fff;
  padding: 14px 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 10px 26px -8px rgba(23,138,70,.6);
}
.btn-whatsapp:hover { filter: brightness(1.06); color: #fff; }

.report-panel {
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 32px);
  box-shadow: var(--shadow-sm);
}

.report-panel h3 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.4px;
  margin: 0;
  color: var(--text);
}

.report-panel > p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 8px 0 18px;
}

.report-tip {
  margin-top: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 13px;
  padding: 13px 15px;
}

.report-tip p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--warning-text);
}

@media (max-width: 640px) {
  .footer-top { flex-direction: column; }
}
