:root {
  --paper: #f5f1eb;
  --surface: #fffefa;
  --ink: #121212;
  --muted: #68645f;
  --line: #dedbd4;
  --green: #4a765f;
  --blue: #2d4f6f;
  --rust: #a75c45;
  --cream: #ebe2d2;
  --shadow: 0 22px 60px rgba(42, 38, 31, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(222, 219, 212, 0.8);
  background: rgba(245, 241, 235, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--blue);
  background: #eef2f1;
  font-size: 17px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-size: 15px;
}

.nav a:hover,
.header-action:hover {
  color: var(--ink);
}

.header-action {
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 700;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  align-items: center;
  min-height: calc(100vh - 74px);
  gap: clamp(34px, 6vw, 88px);
  padding: clamp(44px, 7vw, 92px) clamp(20px, 6vw, 88px) 60px;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 15px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(54px, 8vw, 104px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
  letter-spacing: 0;
}

.hero-text,
.split-copy p,
.budget-copy p,
.chart-copy p,
.download-section p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
}

.hero-text {
  max-width: 620px;
}

.hero-actions,
.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 800;
  cursor: pointer;
}

.button:focus-visible,
.header-action:focus-visible,
.nav a:focus-visible {
  outline: 3px solid rgba(45, 79, 111, 0.28);
  outline-offset: 3px;
}

.button.primary {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.button.secondary {
  color: var(--ink);
  background: var(--surface);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 560px;
  margin: 48px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.hero-stats div {
  padding: 22px 18px 0 0;
}

.hero-stats dt {
  font-size: 25px;
  font-weight: 900;
}

.hero-stats dd {
  margin: 6px 0 0;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  min-height: 680px;
}

.phone-stack {
  position: absolute;
  inset: 0;
}

.phone {
  position: absolute;
  width: min(330px, 42vw);
  margin: 0;
  overflow: hidden;
  border: 10px solid #111;
  border-radius: 34px;
  background: #111;
  box-shadow: var(--shadow);
}

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

.phone-main {
  right: 13%;
  top: 0;
  z-index: 2;
}

.phone-back {
  left: 2%;
  top: 92px;
  z-index: 1;
  transform: rotate(-4deg);
  opacity: 0.94;
}

.floating-card {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 6px;
  min-width: 168px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: var(--shadow);
}

.floating-card span {
  color: var(--muted);
  font-weight: 700;
}

.floating-card strong {
  color: var(--blue);
  font-size: 28px;
}

.balance-card {
  left: 0;
  bottom: 120px;
}

.budget-card {
  right: 0;
  bottom: 230px;
}

.section {
  padding: 86px clamp(20px, 6vw, 88px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 36px;
}

.feature-band {
  background: var(--surface);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  min-height: 245px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f7f3;
}

.feature-card p,
.check-list {
  color: var(--muted);
  line-height: 1.75;
}

.feature-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid #cfd6d2;
  border-radius: 8px;
  color: var(--green);
  background: #eef2f1;
  font-size: 28px;
  font-weight: 900;
}

.split-section,
.budget-section,
.chart-section,
.download-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(34px, 6vw, 82px);
}

.screen-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.screen-gallery img,
.chart-panel img {
  overflow: hidden;
  border: 8px solid #111;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.screen-gallery img:nth-child(2) {
  margin-top: 44px;
}

.check-list {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  content: "✓";
  font-weight: 900;
}

.budget-section {
  background: #eef2f1;
}

.budget-demo {
  padding: 34px;
  border: 1px solid #cfd6d2;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  color: var(--blue);
}

.demo-head span {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
}

.demo-head strong {
  font-size: 44px;
}

.progress-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 18px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.progress-row span {
  font-size: 21px;
  font-weight: 800;
}

.progress-row b {
  padding: 6px 12px;
  border: 1px solid #cfd6d2;
  border-radius: 8px;
  color: var(--green);
  background: #eef2f1;
}

.progress-row i {
  grid-column: 1 / -1;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #f3f2ef;
}

.progress-row i::before {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  content: "";
}

.chart-section {
  grid-template-columns: minmax(320px, 0.8fr) minmax(0, 1fr);
}

.chart-panel {
  max-width: 390px;
}

.download-section {
  margin: 0 clamp(20px, 6vw, 88px) 70px;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.download-section h2 {
  margin-bottom: 12px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover {
  color: var(--ink);
}

.legal-page {
  background: var(--surface);
}

.legal-shell {
  padding: 42px clamp(18px, 6vw, 88px) 64px;
}

.legal-document {
  max-width: 820px;
  margin: 0 auto;
}

.legal-document h1 {
  margin-bottom: 10px;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.18;
}

.legal-meta {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 14px;
}

.legal-document section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.legal-document h2 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.35;
}

.legal-document p,
.legal-document li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.78;
}

.legal-document p {
  margin-bottom: 8px;
}

.legal-document ul {
  display: grid;
  gap: 5px;
  margin: 8px 0;
  padding-left: 20px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  transform: translate(-50%, 24px);
  padding: 14px 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .hero,
  .split-section,
  .budget-section,
  .chart-section,
  .download-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-visual {
    min-height: 620px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chart-panel {
    max-width: 340px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 14px 18px;
  }

  .brand {
    font-size: 18px;
  }

  .header-action {
    padding: 10px 14px;
  }

  .hero,
  .section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats div {
    padding-top: 18px;
  }

  .hero-visual {
    min-height: 510px;
  }

  .phone {
    width: 238px;
    border-width: 7px;
    border-radius: 26px;
  }

  .phone-main {
    right: 0;
  }

  .phone-back {
    left: 0;
    top: 82px;
  }

  .floating-card {
    min-width: 138px;
    padding: 14px;
  }

  .floating-card strong {
    font-size: 22px;
  }

  .balance-card {
    bottom: 86px;
  }

  .budget-card {
    bottom: 178px;
  }

  .feature-grid,
  .screen-gallery {
    grid-template-columns: 1fr;
  }

  .screen-gallery {
    max-width: 280px;
    margin: 0 auto;
  }

  .screen-gallery img:nth-child(2) {
    margin-top: 0;
  }

  .budget-demo,
  .download-section {
    padding: 24px;
  }

  .download-section {
    margin-left: 18px;
    margin-right: 18px;
  }

  .download-actions,
  .hero-actions {
    width: 100%;
  }

  .button {
    flex: 1 1 150px;
  }

  .site-footer {
    flex-direction: column;
  }

  .legal-shell {
    padding-top: 32px;
  }

  .legal-document h1 {
    font-size: 24px;
  }

  .legal-document h2 {
    font-size: 18px;
  }

  .legal-document p,
  .legal-document li {
    font-size: 14px;
    line-height: 1.72;
  }
}
