/* Sổ Thu Chi website. Colors are the app's Sapphire tokens (docs/DESIGN.md). */
@import url(fonts.css?v=7bffa9b16d);

:root {
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #5B6474;
  --line: #E3E8F0;
  --brand: #1D4ED8;
  --brand-tint: #E6EEFF;
  --header: #1E3A8A;
  --header-deep: #13254F;
  --night: #0B1220;
  --on-header: #D6E0FA;
  --on-header-2: #C7D4F5;
  --on-night: #9AA4B5;
  --income: #047857;
  --expense: #B91C1C;
  --expense-soft: #FBD5D5;
  --transfer: #6D28D9;
  --gold: #92400E;
  --gold-soft: #FEF6E4;
  --coin: #F5B82E;
  --frame: #0F1B3D;
  --pad-x: clamp(20px, 4.4vw, 64px);
  --section-y: clamp(72px, 9vw, 136px);
  --shadow-1: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-2: 0 24px 60px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.06);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #9AA4B5 var(--bg); }
body {
  margin: 0;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
::selection { background: #C7D7FE; color: var(--ink); }
a { color: var(--brand); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--header); }
:focus-visible { outline: 3px solid var(--coin); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
/* Be Vietnam Pro has Latin and Vietnamese only: these languages use the system font on the whole page. */
:lang(ja) body, body:lang(ja) { font-family: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; }
:lang(ko) body, body:lang(ko) { font-family: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
:lang(ru) body, body:lang(ru) { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
:lang(th) body, body:lang(th) { font-family: system-ui, -apple-system, "Sukhumvit Set", Thonburi, "Leelawadee UI", "Noto Sans Thai", sans-serif; line-height: 1.75; }
:lang(ja) h1, :lang(ja) h2 { letter-spacing: -0.01em; word-break: auto-phrase; line-break: strict; }
:lang(ko) h1, :lang(ko) h2 { letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--pad-x); }
.skip { position: absolute; left: 12px; top: -48px; background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and navigation */
.top { background: var(--header); color: #FFFFFF; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-block: 18px; }
.brand { display: flex; align-items: center; gap: 12px; color: #FFFFFF; text-decoration: none; margin-right: auto; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { color: #FFFFFF; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 2px 6px rgba(5, 15, 45, 0.35); }
.nav-links { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 15px; font-weight: 500; }
.nav-links a { color: #E8EDF5; text-decoration: none; display: inline-block; padding: 10px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #FFFFFF; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--coin); text-decoration-thickness: 2px; }
/* Language menu (web/tools/languages.py) */
.langs { position: relative; align-self: center; }
.langs summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; color: #E8EDF5; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { border-color: #FFFFFF; color: #FFFFFF; }
.langs summary svg { width: 18px; height: 18px; }
.langs ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; margin: 0; padding: 6px; list-style: none; min-width: 180px; background: var(--surface); border-radius: 14px; box-shadow: 0 18px 40px rgba(5, 15, 45, 0.3); }
.langs ul a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink) !important; text-decoration: none !important; }
.langs ul a:hover { background: var(--bg); }
.langs ul a[aria-current] { color: var(--brand) !important; font-weight: 600; }

/* App Store badge (drawn from Apple's black badge; swap for the official SVG from developer.apple.com/app-store/marketing/guidelines) */
.store { display: inline-flex; align-items: center; gap: 10px; background: #000000; color: #FFFFFF; text-decoration: none; border: 1px solid #A6A6A6; border-radius: 12px; padding: 8px 20px 8px 14px; min-height: 52px; transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out); }
.store:hover { color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }
.store svg { width: 28px; height: 28px; fill: currentColor; }
.store span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store small { font-size: 11px; font-weight: 500; }
.store strong { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

/* Hero */
.hero { overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 56px; align-items: end; padding-top: clamp(40px, 6vw, 88px); }
.hero-copy { padding-bottom: clamp(48px, 7vw, 120px); }
.hero h1 { font-size: clamp(40px, 5.6vw, 78px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 800; }
.hero .lede { margin-top: 24px; max-width: 34em; font-size: clamp(17px, 1.5vw, 20px); color: var(--on-header); }
.cta-row { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.cta-row .meta { font-size: 15px; color: var(--on-header-2); }
.hero-phone { display: flex; justify-content: center; }
.hero-phone img { width: 100%; max-width: 340px; border-radius: 46px 46px 0 0; border: 9px solid #0B1A45; border-bottom: 0; box-shadow: 0 -10px 60px rgba(5, 15, 45, 0.45); margin-bottom: -2px; animation: rise 0.9s var(--ease-out) both; }
@keyframes rise { from { transform: translateY(48px); } to { transform: none; } }

/* Sections */
.section { padding-block: var(--section-y); }
.section.white { background: var(--surface); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 64px; align-items: center; }
h2 { font-size: clamp(32px, 3.8vw, 54px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.sub { margin-top: 20px; max-width: 34em; color: var(--muted); font-size: 18px; }

.ticks { list-style: none; margin: 32px 0 0; padding: 0; max-width: 34em; border-top: 1px solid var(--line); }
.ticks li { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ticks svg { flex: none; width: 24px; height: 24px; stroke: var(--brand); }

/* Try-it keypad: mirrors the app's expense editor */
.pad { width: 100%; max-width: 400px; margin: 0 auto; }
.pad-card { background: var(--surface); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-2); }
.pad-head { background: var(--expense); color: #FFFFFF; padding: 20px 20px 24px; text-align: center; }
.seg { display: inline-flex; background: rgba(0, 0, 0, 0.18); border-radius: 999px; padding: 3px; font-size: 14px; font-weight: 500; }
.seg span { padding: 5px 18px; color: var(--expense-soft); border-radius: 999px; }
.seg span[aria-current] { background: rgba(255, 255, 255, 0.24); color: #FFFFFF; }
.pad-amount { margin-top: 16px; font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pad-expr { margin-top: 6px; min-height: 24px; font-size: 15px; color: var(--expense-soft); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.chips { display: flex; gap: 8px; padding: 14px 16px; overflow: hidden; border-bottom: 1px solid var(--line); font-size: 13px; }
.chip { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--bg); color: var(--ink-2); flex: none; }
.chip.on { background: #FDE2E2; color: #8F1D1D; font-weight: 600; padding-left: 6px; }
.chip.on i { width: 24px; height: 24px; border-radius: 999px; background: var(--expense); display: grid; place-items: center; }
.keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 14px; background: #EEF1F6; }
.keys button { height: 52px; border: 0; border-radius: 12px; font: inherit; font-size: 20px; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--ink); box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08); transition: transform 0.08s ease, filter 0.15s ease; touch-action: manipulation; }
.keys button:hover { filter: brightness(0.97); }
.keys button:active { transform: scale(0.96); }
.keys .op { background: var(--brand-tint); color: var(--brand); }
.keys .eq { background: var(--expense); color: #FFFFFF; }
.keys .save { background: var(--brand); color: #FFFFFF; }
.pad-note { margin-top: 16px; min-height: 26px; font-size: 15px; color: var(--muted); text-align: center; }
.pad-note.saved { color: var(--income); font-weight: 600; }

/* Screens */
.shots { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.shots figure, .shot { margin: 0; }
.device { width: 100%; max-width: 330px; margin: 0 auto; border-radius: 36px; border: 7px solid var(--frame); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16); background: var(--frame); }
.shots figcaption { margin: 20px auto 0; max-width: 330px; }
.shots figcaption strong { display: block; font-weight: 700; }
.shots figcaption span { color: var(--muted); }

/* Plan list */
.ledger { margin-top: 36px; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-1); overflow: hidden; max-width: 560px; }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.badge { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; }
.badge svg { width: 20px; height: 20px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row .what { flex: 1; min-width: 0; }
.row .what strong { display: block; font-weight: 600; }
.row .what span { font-size: 14px; color: var(--muted); }
.row .amt { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { margin: 12px 0 2px 54px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.footnote { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Private-by-default band */
.night { background: var(--header-deep); color: #FFFFFF; }
.facts { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 40px 48px; }
.facts div { border-top: 2px solid var(--coin); padding-top: 20px; }
.facts strong { display: block; font-size: 19px; font-weight: 700; }
.facts p { margin-top: 8px; color: #C3CEE8; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 48px; min-height: 44px; color: #FFFFFF; font-weight: 600; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--coin); text-decoration-thickness: 2px; }
.arrow-link:hover { color: #FFFFFF; }
.arrow-link svg { width: 18px; height: 18px; transition: transform 0.2s var(--ease-out); }
.arrow-link:hover svg { transform: translateX(4px); }

/* Pro */
.pro { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.swatches span { width: 40px; height: 40px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.swatch-label { margin-top: 40px; font-weight: 600; }
.table-box { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-1); font-size: 16px; }
.compare th, .compare td { padding: 14px 20px; text-align: left; vertical-align: top; }
.compare thead th { padding-block: 18px; font-weight: 700; }
.compare tbody tr { border-top: 1px solid var(--line); }
.compare tbody th { font-weight: 500; }
.compare td { color: var(--muted); }
.compare .p { background: var(--gold-soft); color: var(--ink); font-weight: 600; }
.compare thead .p { color: var(--gold); }

/* Closing call to action */
.closing { text-align: center; max-width: 760px; }
.closing img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto; box-shadow: 0 12px 30px rgba(30, 58, 138, 0.3); }
.closing h2 { margin-top: 28px; font-size: clamp(30px, 3.4vw, 48px); }
.closing p { margin-top: 16px; color: var(--muted); }
.closing .store { margin-top: 32px; }

/* Footer */
.foot { background: var(--night); color: var(--on-night); font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 32px; padding-block: 32px; }
.foot .wrap > span { margin-right: auto; }
.foot a { color: #E8EDF5; display: inline-block; padding: 10px 0; }
.foot a:hover { color: #FFFFFF; }

/* Document pages (privacy, support) */
.doc-head { padding-block: clamp(32px, 5vw, 64px) clamp(40px, 5vw, 72px); }
.doc-head h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.doc-head p { margin-top: 16px; max-width: 40em; color: var(--on-header); }
.doc-head .mail { display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; min-height: 48px; padding: 0 24px; border-radius: 12px; background: var(--surface); color: var(--header); font-weight: 700; text-decoration: none; box-shadow: 0 8px 24px rgba(5, 15, 45, 0.3); }
.doc-head .mail svg { width: 20px; height: 20px; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: clamp(40px, 5vw, 72px) 96px; line-height: 1.65; }
.toc { position: sticky; top: 24px; font-size: 15px; }
.toc p { font-weight: 700; margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.paper { max-width: 72ch; background: var(--surface); border-radius: 20px; padding: clamp(24px, 4vw, 56px); box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06); }
.paper h2 { font-size: 26px; line-height: 1.25; letter-spacing: -0.02em; margin-top: 48px; scroll-margin-top: 24px; }
.paper h2:first-child { margin-top: 0; }
.paper p, .paper ul { margin-top: 14px; }
.paper ul { padding-left: 22px; display: grid; gap: 8px; }
.paper .small { color: var(--muted); font-size: 15px; }
.data { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; margin-top: 18px; }
.data th, .data td { padding: 12px; text-align: left; vertical-align: top; }
.data th:first-child, .data td:first-child { padding-left: 0; }
.data thead tr { border-bottom: 2px solid var(--line); }
.data tbody tr { border-bottom: 1px solid var(--line); }
.data tbody tr:last-child { border-bottom: 0; }
.data tbody th { font-weight: 600; }
.faq { max-width: 760px; margin-top: 24px; background: var(--surface); border-radius: 20px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); padding: 0 24px; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; margin-top: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform 0.2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding-bottom: 18px; color: var(--ink-2); }
.doc-section { padding-block: clamp(40px, 5vw, 72px) 96px; }
.doc-section h2 { font-size: 28px; letter-spacing: -0.02em; }

@media (max-width: 900px) {
  .hero-grid, .split, .pro { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 8px; }
  .hero-phone img { max-width: 300px; }
  .shots { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: calc(-1 * var(--pad-x)); padding: 0 var(--pad-x) 12px; scrollbar-width: none; }
  .shots::-webkit-scrollbar { display: none; }
  .shots figure { flex: 0 0 72%; max-width: 300px; scroll-snap-align: center; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
