/* Trang chủ Sổ Thu Chi. Không JS, không font ngoài, không tracking.
   Màu lấy từ icon app: xanh sổ, giấy, tab vàng; nền trang là `bg` sáng của app. */

:root {
  --field: #075e57;
  --field-deep: #05473f;
  --ink: #14161f;
  --dim: #4a4f60;
  --page: #f3f5fe;
  --paper: #fbf6e9;
  --tab: #f8c95a;
  --expense: #b8453c;
  --line: #d3d8ea;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

a { color: var(--field); }
a:focus-visible { outline: 3px solid var(--tab); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }

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

/* Đầu trang */

.field { background: var(--field); color: #fff; }
.field a:not(.cta) { color: #fff; }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
}

.brand img { border-radius: 9px; }

.bar nav { display: flex; gap: 20px; font-size: 16px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 64px;
  padding-block: 44px 84px;
}

h1 {
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

.pitch > p:first-of-type {
  margin-top: 20px;
  max-width: 34em;
  color: #e4f1ef;
}

.cta {
  display: inline-block;
  margin-top: 28px;
  padding: 15px 26px;
  border-radius: 14px;
  background: var(--tab);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.cta:hover { background: #fbd77e; }
.cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.fine { margin-top: 12px; font-size: 15px; color: #cfe5e1; }

/* Trang sổ: gáy lò xo và tab vàng như trên icon */

.note {
  position: relative;
  margin-left: 22px;
  padding: 30px 30px 26px 44px;
  border: 5px solid var(--field-deep);
  border-radius: 30px;
  background: var(--paper);
  color: var(--ink);
}

.note::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -27px;
  right: 34px;
  width: 44%;
  height: 50px;
  border: 5px solid var(--field-deep);
  border-radius: 18px 18px 0 0;
  background: var(--tab);
}

.hero { position: relative; z-index: 0; }

.rings {
  position: absolute;
  left: -24px;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.rings i {
  display: block;
  width: 46px;
  height: 26px;
  border: 5px solid var(--field-deep);
  border-radius: 14px;
  background: var(--paper);
}

.typed {
  padding-bottom: 14px;
  border-bottom: 3px solid var(--field);
  font-size: clamp(21px, 2.5vw, 27px);
  font-weight: 600;
  white-space: nowrap;
}

.typed span { display: inline-block; }

.ledger { list-style: none; padding: 0; }

.ledger li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 13px;
  border-bottom: 1px solid #e5dcc2;
  font-size: 19px;
  font-weight: 600;
}

.ledger small {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--dim);
}

.ledger b {
  color: var(--expense);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ledger .sum { border-bottom: 0; padding-bottom: 0; font-size: 21px; font-weight: 800; }
.ledger .sum b { font-weight: 800; }

/* Khoảnh khắc duy nhất của trang: câu được gõ ra rồi tách thành từng dòng */

@media (prefers-reduced-motion: no-preference) {
  .typed span { animation: type 1.5s steps(21, end) 0.4s backwards; }
  .ledger li { animation: land 0.32s ease-out backwards; }
  .ledger li:nth-child(1) { animation-delay: 2s; }
  .ledger li:nth-child(2) { animation-delay: 2.25s; }
  .ledger li:nth-child(3) { animation-delay: 2.6s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes land { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* Nội dung */

main { padding-block: 72px 24px; }

h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 800;
}

h3 { font-size: 19px; line-height: 1.3; font-weight: 700; }

.shots ul {
  list-style: none;
  padding: 0;
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.shots h3 { margin-top: 16px; }
.shots li p { margin-top: 6px; font-size: 16px; color: var(--dim); }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
  margin-top: 88px;
  padding-top: 28px;
  border-top: 3px solid var(--field);
}

.split > div > p { margin-top: 14px; color: var(--dim); font-size: 17px; }

table { width: 100%; border-collapse: collapse; font-size: 17px; }
th, td { padding: 11px 12px 11px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { font-weight: 800; color: var(--field); }
tbody th { font-weight: 500; }
td { white-space: nowrap; }

.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.fit ul { margin-top: 10px; padding-left: 20px; }
.fit li { margin-top: 6px; font-size: 17px; color: var(--dim); }

.faq h3 { margin-top: 28px; }
.faq h3:first-child { margin-top: 0; }
.faq h3 + p { margin-top: 6px; max-width: 38em; color: var(--dim); font-size: 17px; }

/* Cuối trang */

footer.field { margin-top: 88px; padding-block: 56px 28px; }

.end {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}

.end-line { font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; }
.end nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 16px; }
.legal { margin-top: 32px; font-size: 14px; color: #cfe5e1; }

/* Màn hình nhỏ */

@media (max-width: 900px) {
  body { font-size: 17px; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 56px; padding-block: 24px 56px; }
  .shots ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 64px; }
}

@media (max-width: 520px) {
  .bar nav { gap: 14px; font-size: 15px; }
  .note { padding: 24px 20px 20px 36px; }
  .fit { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  table { font-size: 15.5px; }
  td { white-space: normal; }
}

/* Khối đầu tiên ngay dưới phần đầu trang không cần khoảng cách và đường kẻ của `.split` */
.split.first { margin-top: 0; padding-top: 0; border-top: 0; }
