.page-home {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --card: #f7f7f7;
  --muted: #707070;
  --soft: #8a8a8a;
  --hairline: #ebebeb;
  --edge: rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
  --solid-hover: #3a3a3a;
  --ink-stage: #f7f7f7;

  --income: #10b981;
  --expense: #f97316;
  --debt: #8b5cf6;
  --income-text: #059669;
  --expense-text: #ea580c;

  --radius-lg: 28px;
  --radius-md: 22px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  .page-home {
    --bg: #000000;
    --fg: #fafafa;
    --card: #1c1c1c;
    --muted: #a3a3a3;
    --soft: #737373;
    --hairline: rgba(255, 255, 255, 0.08);
    --edge: rgba(255, 255, 255, 0.08);
    --shadow: none;
    --solid-hover: #d9d9d9;
    --ink-stage: #000000;

    --expense: #fb923c;
    --debt: #a78bfa;
    --income-text: #10b981;
    --expense-text: #fb923c;
  }
  .page-home .brand__mark { filter: invert(1); }
}

html:has(> .page-home) { background: #fff; }
@media (prefers-color-scheme: dark) {
  html:has(> .page-home) { background: #000; }
}

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

.page-home {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

.page-home h1,
.page-home h2,
.page-home h3,
.page-home p,
.page-home ul,
.page-home figure { margin: 0; padding: 0; }
.page-home ul { list-style: none; }
.page-home img { display: block; max-width: 100%; height: auto; }
.page-home a { color: inherit; }

.page-home :focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 6px;
}
.page-home .pill:focus-visible { border-radius: 999px; }

.page-home .icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-home .icon--sm { width: 16px; height: 16px; }

.page-home .container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 720px) {
  .page-home .container { padding: 0 32px; }
}

/* Header */

.page-home .top { padding: 16px 0; }
.page-home .top__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.page-home .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.page-home .brand__mark { width: 38px; height: auto; }
.page-home .brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.page-home .brand__name { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-home .brand__tag { font-size: 14px; color: var(--muted); white-space: nowrap; }

.page-home .top-cta__short { display: none; }
@media (max-width: 479px) {
  .page-home .top-cta__full { display: none; }
  .page-home .top-cta__short { display: inline; }
}

/* Capsules */

.page-home .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 200ms ease-out, color 200ms ease-out, border-color 200ms ease-out;
}
.page-home .pill--outline {
  padding: 9px 16px;
  font-size: 15px;
  border: 1px solid var(--fg);
  color: var(--fg);
}
.page-home .pill--outline:hover {
  background: var(--fg);
  color: var(--bg);
}
.page-home .pill--solid {
  padding: 15px 26px;
  font-size: 17px;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
}
.page-home .pill--solid:hover {
  background: var(--solid-hover);
  border-color: var(--solid-hover);
}

.page-home .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.page-home .chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px 8px 13px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--edge);
  font-size: 16px;
  font-weight: 500;
}

.page-home .round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--edge);
  color: var(--fg);
}
.page-home .round--sm { width: 38px; height: 38px; }
.page-home .round.is-debt { color: var(--debt); }

/* Type */

.page-home .headline {
  font-size: clamp(2.1rem, 1.25rem + 3.2vw, 3.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.page-home .headline--hero {
  font-size: clamp(2.6rem, 1.4rem + 4.4vw, 4.5rem);
  line-height: 1.01;
  letter-spacing: -0.035em;
}
.page-home .headline__soft {
  display: block;
  color: var(--soft);
}
.page-home .lede {
  font-size: clamp(1.125rem, 1.02rem + 0.35vw, 1.3125rem);
  line-height: 1.45;
  color: var(--fg);
  max-width: 34em;
  text-wrap: pretty;
}
.page-home .body {
  color: var(--muted);
  max-width: 34em;
  text-wrap: pretty;
}
.page-home .headline + .lede { margin-top: 20px; }
.page-home .lede + .body { margin-top: 14px; }

.page-home .text-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: var(--soft);
}
.page-home .text-link:hover { text-decoration-color: currentColor; }

/* Hero */

.page-home .hero { padding: 36px 0 0; }
.page-home .hero__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.page-home .hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.page-home .hero__copy .lede { margin-top: 20px; max-width: 30em; text-wrap: balance; }
.page-home .hero__copy .chips { margin-top: 24px; justify-content: center; }
.page-home .cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.page-home .hero { overflow: hidden; }
.page-home .hero__phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  max-width: 980px;
  margin: 24px auto 0;
  pointer-events: none;
}
/* All three PNGs share one canvas; the phone bottom sits at 88.6% of its height. */
.page-home .hero__phone { flex: none; width: 54%; height: auto; }
.page-home .hero__phone--main {
  position: relative;
  z-index: 1;
  margin: 0 -20%;
  transform: scale(1.12);
  transform-origin: 50% 88.6%;
}

@media (min-width: 900px) {
  .page-home .hero { padding: 64px 0 0; }
  .page-home .hero__phones { max-width: 1060px; margin-top: 40px; }
  .page-home .hero__phone { width: 36%; }
  .page-home .hero__phone--main { margin: 0 -13.3%; }
}

/* Sections */

.page-home .section { padding: clamp(72px, 11vw, 150px) 0 0; }
.page-home .section__head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }

.page-home .feature {
  display: grid;
  gap: 36px;
  align-items: center;
}
.page-home .feature__media {
  width: 100%;
  max-width: 500px;
  justify-self: center;
}
@media (min-width: 840px) {
  .page-home .feature { grid-template-columns: 1fr 1fr; gap: 72px; }
  .page-home .feature--flip .feature__media { order: -1; }
}

.page-home .stage {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
}
.page-home .stage img { width: 100%; }

.page-home .shot {
  --fade-top: linear-gradient(to bottom,
    transparent 0, rgba(0,0,0,.06) 4%, rgba(0,0,0,.2) 8%, rgba(0,0,0,.42) 12%,
    rgba(0,0,0,.66) 16%, rgba(0,0,0,.85) 20%, rgba(0,0,0,.96) 24%, #000 28%);
  width: 86%;
  margin: 0 auto;
  -webkit-mask-image: var(--fade-top);
  mask-image: var(--fade-top);
}
/* The papers stick out past the phone frame, which spans 6%–94% of the image. */
.page-home .shot--scan {
  --fade-sides: linear-gradient(to right,
    transparent 0, rgba(0,0,0,.35) 2%, rgba(0,0,0,.8) 4%, #000 5.5%,
    #000 94.5%, rgba(0,0,0,.8) 96%, rgba(0,0,0,.35) 98%, transparent 100%);
  -webkit-mask-image: var(--fade-top), var(--fade-sides);
  -webkit-mask-composite: source-in;
  mask-image: var(--fade-top), var(--fade-sides);
  mask-composite: intersect;
}
.page-home .shot img { width: 100%; }

/* Without opening the app */

.page-home .ways {
  display: grid;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
}
.page-home .ways__item { padding: 26px 24px; }
.page-home .ways__item + .ways__item { border-top: 1px solid var(--hairline); }
.page-home .ways__item h3 { margin-top: 18px; font-size: 21px; font-weight: 700; letter-spacing: -0.015em; }
.page-home .ways__item p { margin-top: 6px; color: var(--muted); }
.page-home .ways__more { margin-top: 24px; }
@media (min-width: 840px) {
  .page-home .ways { grid-template-columns: repeat(3, 1fr); }
  .page-home .ways__item { padding: 32px 30px 34px; }
  .page-home .ways__item + .ways__item { border-top: 0; border-left: 1px solid var(--hairline); }
}

/* Insights bento */

.page-home .bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.page-home .tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
}
.page-home .tile--insights {
  grid-column: 1 / -1;
  height: clamp(380px, 110vw, 560px);
  padding: 0 11%;
}
.page-home .tile--insights img { width: 100%; max-width: 420px; margin: 0 auto; }
.page-home .tile--stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 168px;
  padding: 18px;
}
.page-home .tile--wide { grid-column: 1 / -1; }
.page-home .tile__label { font-size: 17px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.page-home .tile__note { margin-top: 4px; font-size: 15px; line-height: 1.35; color: var(--muted); }
.page-home .tile__value {
  align-self: flex-end;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.page-home .is-income { color: var(--income-text); }
.page-home .is-expense { color: var(--expense-text); }

.page-home .tile--analytics {
  grid-column: 1 / -1;
  height: clamp(420px, 120vw, 520px);
  padding: 20px;
}
.page-home .tile--analytics img {
  position: absolute;
  top: 96px;
  left: 0;
  width: 100%;
}

@media (min-width: 960px) {
  .page-home .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: 220px 220px 320px;
    gap: 14px;
  }
  .page-home .tile--insights { grid-column: 1 / 3; grid-row: 1 / 3; height: auto; padding: 0 12%; }
  .page-home .tile--wide { grid-column: 3 / 5; }
  .page-home .tile--stat { min-height: 0; padding: 22px; }
  .page-home .tile--analytics { grid-column: 1 / 3; height: auto; padding: 24px; }
  .page-home .tile--analytics .tile__text { max-width: 40%; }
  .page-home .tile--analytics img {
    top: 24px;
    left: auto;
    right: 0;
    width: 58%;
    --fade-left: linear-gradient(to right,
      transparent 0, rgba(0,0,0,.04) 5%, rgba(0,0,0,.14) 10%, rgba(0,0,0,.3) 15%,
      rgba(0,0,0,.5) 20%, rgba(0,0,0,.7) 25%, rgba(0,0,0,.86) 30%, rgba(0,0,0,.96) 35%, #000 40%);
    -webkit-mask-image: var(--fade-left);
    mask-image: var(--fade-left);
  }
}

/* Everyday tools band */

.page-home .band {
  display: grid;
  gap: 36px;
}
.page-home .band__item figcaption { margin-top: 18px; padding: 0 4px; }
.page-home .band__item h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.page-home .band__item p { margin-top: 4px; color: var(--muted); }
.page-home .stage--shot,
.page-home .stage--rows { aspect-ratio: 5 / 4; }
.page-home .stage--shot img {
  position: absolute;
  top: 9%;
  left: 50%;
  width: 86%;
  transform: translateX(-50%);
}
.page-home .stage--wide-shot img { width: 100%; }
.page-home .stage--rows {
  display: flex;
  align-items: center;
  background: var(--ink-stage);
}
@media (min-width: 840px) {
  .page-home .band { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .page-home .stage--shot,
  .page-home .stage--rows { aspect-ratio: 10 / 11; }
}

.page-home .list {
  margin-top: 48px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.page-home .list__row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
}
.page-home .list__row + .list__row { border-top: 1px solid var(--hairline); }
.page-home .list__row h3 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.page-home .list__row p { margin-top: 2px; font-size: 16px; line-height: 1.4; color: var(--muted); }
@media (min-width: 840px) {
  .page-home .list { display: grid; grid-template-columns: 1fr 1fr; }
  .page-home .list__row { padding: 22px 26px; }
  .page-home .list__row:nth-child(2) { border-top: 0; }
  .page-home .list__row:nth-child(even) { border-left: 1px solid var(--hairline); }
}

/* Shared spaces: always a light card, the counterpart of the black Light & Dark card */

.page-home .shared__head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.page-home .shared__head .lede { margin-left: auto; margin-right: auto; }
.page-home .shared {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(to bottom, #fefefe 0, #f4f4f5 45%, #dededf 100%);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  color: #1a1a1a;
}
.page-home .shared__media {
  --fade: linear-gradient(to bottom, #000 0, #000 55%, rgba(0,0,0,.6) 75%, transparent 100%);
  -webkit-mask-image: var(--fade);
  mask-image: var(--fade);
}
.page-home .shared__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 0;
}
.page-home .shared__points {
  position: relative;
  display: grid;
  gap: 22px;
  margin-top: -8%;
  padding: 0 22px 28px;
}
.page-home .shared__points li { display: flex; align-items: flex-start; gap: 14px; }
.page-home .shared__points .round {
  flex: none;
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.page-home .shared__points h3 { font-size: 19px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.page-home .shared__points p { margin-top: 3px; color: #555; }
@media (min-width: 640px) {
  .page-home .shared__media img { aspect-ratio: auto; }
  .page-home .shared__points { grid-template-columns: repeat(2, 1fr); gap: 28px 32px; margin-top: -14%; padding: 0 32px 36px; }
}
@media (min-width: 1000px) {
  .page-home .shared__points { grid-template-columns: repeat(4, 1fr); margin-top: -18%; padding: 0 40px 44px; }
  .page-home .shared__points li { flex-direction: column; gap: 16px; }
}

/* FAQ */

.page-home .faq {
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.page-home .faq details + details { border-top: 1px solid var(--hairline); }
.page-home .faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.page-home .faq summary::-webkit-details-marker { display: none; }
.page-home .faq summary::after {
  content: "+";
  flex: none;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: var(--soft);
  transition: transform 200ms ease-out;
}
.page-home .faq details[open] summary::after { transform: rotate(45deg); }
.page-home .faq details p { padding: 0 22px 22px; color: var(--muted); max-width: 40em; }
.page-home .faq summary:focus-visible { outline-offset: -2px; border-radius: 0; }
@media (min-width: 840px) {
  .page-home .faq summary { padding: 22px 28px; }
  .page-home .faq details p { padding: 0 28px 24px; }
}

/* Privacy */

.page-home .privacy {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.page-home .privacy .round { margin-bottom: 24px; background: var(--card); }
.page-home .privacy .lede { margin-left: auto; margin-right: auto; }
.page-home .privacy .lede + .lede { margin-top: 12px; }
.page-home .privacy__link { margin-top: 22px; }

/* Light and dark */

.page-home .themes {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  color: #fafafa;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 36px 24px 0;
}
.page-home .themes .headline__soft { color: #737373; }
.page-home .themes .lede { color: #fafafa; }
.page-home .themes__img {
  width: min(100%, 420px);
  margin: 36px auto 0;
}
@media (min-width: 840px) {
  .page-home .themes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 0 56px;
  }
  .page-home .themes__img { width: min(100%, 440px); margin: 64px auto 0; align-self: end; }
}

/* Close */

.page-home .close { padding-bottom: clamp(72px, 10vw, 140px); }
.page-home .close__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.page-home .close__icon {
  width: 88px;
  height: 88px;
  border-radius: 22.5%;
  border: 1px solid var(--edge);
  margin-bottom: 28px;
}
.page-home .close .headline { max-width: 14em; }
.page-home .close .pill--solid { margin-top: 32px; }

/* Footer */

.page-home .foot {
  border-top: 1px solid var(--hairline);
  padding: 22px 0 28px;
  font-size: 14px;
  color: var(--muted);
}
.page-home .foot__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}
.page-home .foot__links { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.page-home .foot__links a { text-decoration: none; }
.page-home .foot__links a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.page-home .langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: 16px;
}
.page-home .langs__icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.page-home .langs a { text-decoration: none; }
.page-home .langs a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.page-home .langs a[aria-current] { color: var(--fg); font-weight: 600; }

/* Scripts without letter case or word spaces */

.page-home:lang(ja) .headline,
.page-home:lang(ko) .headline,
.page-home:lang(th) .headline { letter-spacing: normal; line-height: 1.15; }
.page-home:lang(ja) { line-break: strict; word-break: auto-phrase; }
.page-home:lang(ko) { word-break: keep-all; }

/* Motion */

.js .page-home [data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 380ms ease-out, transform 380ms ease-out;
}
.js .page-home [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .page-home [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .page-home .pill { transition: none; }
}
