/* BillyBill: home page and the bill app (index.html + js/app.js) */
:root {
  --bg: #070b17;
  --card: #0f1830;
  --line: #1c2a4a;
  --tx: #eef2fb;
  --mut: #8b9bbd;
  --acc: #5b6cff;
  --on-acc: #ffffff;
  --ok: #4ade9b;
  --warn: #f5c26b;
  --bad: #f07a8a;
  --f1: #16215a;
  --f2: #0d1438;
  --f3: #070b17;
  --f4: #08202e;
  --g2: #5b6cff4d;
  --g3: #2c9eaf08;
  --hbg: #070b17dd;
  --c1: #121d3a99;
  --c2: #0c142899;
  --inp: #0a1124;
  --chip: #16224a;
  --shadow: #0007;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
[data-theme="light"] {
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #c3cedd;
  --tx: #17243a;
  --mut: #4b5d76;
  --acc: #394bc6;
  --on-acc: #ffffff;
  --ok: #08734c;
  --warn: #89520b;
  --bad: #b32b47;
  --f1: #d9ddff;
  --f2: #e2e9ff;
  --f3: #edf2ff;
  --f4: #dcedf8;
  --g2: #5262df59;
  --g3: #43a8b541;
  --hbg: #f5f7fbed;
  --c1: #ffffff;
  --c2: #f9fbff;
  --inp: #f8fafd;
  --chip: #e9edf5;
  --shadow: #1b2a5a1f;
  color-scheme: light;
}
html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
  background: var(--bg);
  overscroll-behavior-y: none;
}
* {
  box-sizing: border-box;
  margin: 0;
}
body {
  color: var(--tx);
  font:
    16px/1.72 "Plus Jakarta Sans",
    "Noto Sans Thai",
    sans-serif;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72rem 48rem at 100% -8%, var(--g2), transparent 72%),
    radial-gradient(ellipse 62rem 46rem at -8% 68%, var(--g3), transparent 74%),
    linear-gradient(132deg,var(--f1) 0%,var(--f2) 34%,var(--f3) 68%,var(--f4) 100%);
}
[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse 72rem 48rem at 8% 0%, var(--g2), transparent 72%),
    radial-gradient(ellipse 62rem 46rem at 100% 100%, var(--g3), transparent 74%),
    linear-gradient(148deg,var(--f1) 0%,var(--f2) 34%,var(--f3) 68%,var(--f4) 100%);
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
option {
  background: var(--card);
  color: var(--tx);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 5vw;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  background: var(--hbg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  cursor: pointer;
}
.logo img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  margin-right: 9px;
  vertical-align: -7px;
}
nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
nav a {
  color: var(--mut);
  cursor: pointer;
  font-size: 15px;
}
nav a:hover {
  color: var(--tx);
}
.theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--tx);
  width: 34px;
  height: 34px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}
.theme:hover {
  border-color: var(--acc);
}
.theme svg {
  display: block;
}
.hr {
  display: flex;
  gap: 18px;
  align-items: center;
}
.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.lang button {
  background: 0;
  border: 0;
  padding: 4px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--mut);
  cursor: pointer;
}
.lang .on {
  background: var(--acc);
  color: var(--on-acc);
}
.btn {
  background: var(--acc);
  border: 0;
  padding: 11px 20px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition:
    filter 0.15s,
    transform 0.15s;
  color: var(--on-acc);
  display: inline-block;
  text-align: center;
}
.btn:hover {
  filter: brightness(0.92);
}
.btn.ghost:hover {
  background: var(--chip);
  filter: none;
}
.btn:active {
  transform: scale(0.98);
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--tx);
}
.btn.ghost.fill {
  background: var(--card);
}
.btn.sm {
  padding: 6px 12px;
  font-size: 14px;
}
label.btn {
  margin: 0;
  font-size: 14px;
}
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
}
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 5vw 80px;
}
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 76px 0 0;
}
.hero h1 {
  font-size: clamp(40px, 8.8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.hero .row {
  justify-content: center;
}
h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 800;
}
.hero p {
  color: var(--mut);
  margin: 24px auto 32px;
  max-width: 560px;
  font-size: 19px;
}
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.card {
  background: linear-gradient(180deg, var(--c1), var(--c2));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}
.glass {
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 60px var(--shadow);
}
h2 {
  font-size: 28px;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.steps,
.feat {
  display: grid;
  gap: 16px;
}
.steps {
  grid-template-columns: repeat(4, 1fr);
}
.steps.card {
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.st {
  padding: 24px;
}
.st + .st {
  border-left: 1px solid var(--line);
}
.how-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.how-top h2 {
  margin: 0;
}
.feat {
  grid-template-columns: repeat(3, 1fr);
}
.steps b {
  color: var(--acc);
  font-size: 14px;
}
.steps h3,
.feat h3 {
  margin: 8px 0 6px;
  font-size: 18px;
}
.steps p,
.feat p,
.feat li {
  color: var(--mut);
  font-size: 14px;
}
.feat ul {
  padding-left: 18px;
  margin-top: 8px;
}
section {
  margin-top: 70px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}
.stat small {
  color: var(--mut);
  display: block;
}
.stat b {
  font-size: 30px;
  letter-spacing: -0.02em;
}
.mrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.mrow:first-child {
  border-top: 0;
}
.mrow .n {
  flex: 1;
  font-weight: 500;
  min-width: 70px;
}
.mrow .a {
  font-variant-numeric: tabular-nums;
  color: var(--mut);
}
.tag {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 700;
  border: 1px solid;
}
.paid {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 48%, transparent);
  background: color-mix(in srgb, var(--ok) 14%, var(--card));
}
.pending {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 48%, transparent);
  background: color-mix(in srgb, var(--warn) 14%, var(--card));
}
.unpaid {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 48%, transparent);
  background: color-mix(in srgb, var(--bad) 14%, var(--card));
}
[data-theme="light"] .paid {
  border-color: color-mix(in srgb, var(--ok) 42%, transparent);
  background: color-mix(in srgb, var(--ok) 9%, var(--card));
}
[data-theme="light"] .pending {
  border-color: color-mix(in srgb, var(--warn) 42%, transparent);
  background: color-mix(in srgb, var(--warn) 9%, var(--card));
}
[data-theme="light"] .unpaid {
  border-color: color-mix(in srgb, var(--bad) 42%, transparent);
  background: color-mix(in srgb, var(--bad) 9%, var(--card));
}
label {
  display: block;
  color: var(--mut);
  font-size: 14px;
  margin: 16px 0 6px;
}
input:not([type="checkbox"]),
select {
  width: 100%;
  background: var(--inp);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 13px;
}
input::placeholder,
textarea::placeholder {
  color: var(--mut);
  opacity: 1;
}
input:focus,
select:focus {
  border-color: var(--acc);
  outline: 0;
}
.chk {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 0;
  color: var(--tx);
}
.chk input {
  margin-top: 5px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chip {
  color: var(--on-acc);
  background: var(--acc);
  border: 1px solid var(--acc);
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.narrow {
  max-width: 520px;
  margin: 60px auto;
}
.link {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--inp);
  border: 1px dashed var(--acc);
  border-radius: 6px;
  padding: 10px 14px;
  margin: 14px 0 0;
  font-family: monospace;
  font-size: 14px;
  word-break: break-all;
}
.big {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
textarea {
  width: 100%;
  min-height: 130px;
  background: var(--inp);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 13px;
  font: inherit;
  color: inherit;
  resize: vertical;
}
textarea:focus {
  border-color: var(--acc);
  outline: 0;
}
.fk {
  color: var(--acc);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.seg button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 9px;
  cursor: pointer;
  color: var(--mut);
}
.seg .on {
  background: var(--acc);
  color: var(--on-acc);
}
.split {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.split span {
  flex: 1;
}
.split input {
  width: 110px;
  text-align: right;
}
.toast {
  color: var(--on-acc);
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--acc);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  z-index: 99;
}
.toast.on {
  opacity: 1;
}
.ok {
  border-color: color-mix(in srgb, var(--ok) 50%, transparent);
  text-align: center;
}
.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.ptop { --pp: clamp(18px, 2.2vw, 26px); flex-wrap: nowrap; position: sticky; top: calc(-1 * var(--pp)); z-index: 2; margin: calc(-1 * var(--pp)) calc(-1 * var(--pp)) 0; padding: var(--pp) var(--pp) 10px; background: var(--card); }
.ptop h2 { min-width: 0; overflow-wrap: anywhere; }
.ptop .fill { flex-shrink: 0; }
.opbar { display: flex; gap: 8px; margin: 8px 0 0; }
.opbar button { flex: 1; min-height: 40px; font: inherit; font-size: 20px; color: var(--tx); background: var(--chip); border: 1px solid var(--line); border-radius: 8px; }
.cnote { margin: 22px 0 0; color: var(--mut); font-size: 12.5px; line-height: 1.6; text-align: center; opacity: 0.8; text-wrap: balance; }
.cnote br.m { display: none; }
@media (max-width: 560px) { .cnote { font-size: 11.5px; } .cnote br.m { display: inline; } .cnote br.d { display: none; } }
.cnote a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.hint {
  color: var(--mut);
  font-size: 14px;
}
.g2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.g3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.modal {
  position: fixed;
  inset: 0;
  background: #000b;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 50;
}
.modal .card {
  background: var(--card);
  max-width: 460px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  overflow-x: hidden;
}
.modal img {
  width: 100%;
  border-radius: 6px;
  margin: 12px 0;
}
#how {
  scroll-margin-top: 96px;
}
.qr {
  background: #fff;
  border-radius: 8px;
  padding: 8px;
  width: 210px;
  max-width: 100%;
  display: block;
  margin: 12px auto;
}
@media (max-width: 820px) {
  .feat,
  .g2 {
    grid-template-columns: 1fr;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .st:nth-child(odd) {
    border-left: 0;
  }
  .st:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
  .hero {
    padding-top: 44px;
  }
  nav a {
    display: none;
  }
  .stats {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .stat b {
    font-size: 20px;
  }
}
@media (max-width: 560px) {
  section {
    margin-top: 48px;
  }
  section h2 {
    font-size: 24px;
  }
  .g3 {
    grid-template-columns: 1fr;
  }
  .how-top .btn {
    padding: 12px;
    font-size: 15px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat {
    padding: 12px 10px;
  }
  .stat small {
    font-size: 13px;
  }
  .stat b {
    font-size: 18px;
  }
  .stats:not(.s2) .stat:last-child {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }
  .stats.s1 .stat b {
    font-size: 17px;
  }
  .stats.s2 {
    grid-template-columns: 1fr;
  }
  .stats.s2 .stat {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 16px;
  }
  .stats.s2 .stat b {
    font-size: 20px;
  }
  .hero p {
    font-size: 15px;
  }
  .hero .row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .hero .row .btn {
    width: 100%;
  }
  .how-top {
    flex-direction: column;
    align-items: stretch;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .st {
    padding: 16px 18px;
  }
  .st:nth-child(n + 2) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .sh {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }
  .sh h3 {
    margin: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
.who2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.who2 h3 {
  margin: 10px 0 6px;
  font-size: 18px;
}
.who2 p,
.who2 li {
  color: var(--mut);
  font-size: 14px;
}
.who2 ul {
  padding-left: 18px;
  margin-top: 8px;
}
.uc {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 14px;
  background: linear-gradient(155deg, var(--c1), var(--c2));
  color: var(--tx);
  font-size: 14px;
}
@media (max-width: 820px) {
  .who2 {
    grid-template-columns: 1fr;
  }
}
.foot {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  padding-top: 44px;
}
.fgrid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 40px;
}
.fh {
  font-size: 18px;
  margin-bottom: 14px;
}
.fl {
  display: block;
  color: var(--mut);
  padding: 5px 0;
  cursor: pointer;
  text-decoration: none;
}
.fl:hover {
  color: var(--tx);
}
.fbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 20px;
  color: var(--mut);
  font-size: 14px;
}
@media (max-width: 820px) {
  .fgrid {
    grid-template-columns: 1fr;
  }
}
.grp {
  border-top: 1px solid var(--line);
}
.grp summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
}
.grp summary::-webkit-details-marker {
  display: none;
}
.grp summary::before {
  content: "•";
  color: var(--acc);
  font-size: 22px;
  line-height: 1;
  width: 14px;
  text-align: center;
}
.grp[open] summary::before {
  content: "▾";
  font-size: 14px;
}
.grp summary .n {
  flex: 1;
  font-weight: 500;
}
.grp .mrow {
  margin-left: 24px;
}
.mini {
  display: flex;
  gap: 10px 22px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--mut);
}
.mini .fl {
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rise {
  animation: rise 0.7s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
    html {
  scroll-behavior: smooth;
  scrollbar-color: var(--mut) var(--bg);
  scrollbar-width: thin;
}
::selection {
  color: var(--on-acc);
  background: var(--acc);
}
body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
header {
  min-height: 68px;
  padding-inline: clamp(18px, 5vw, 72px);
}
.theme {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.btn {
  min-height: 44px;
  border-radius: 10px;
}
.btn.sm {
  min-height: 38px;
  padding: 7px 14px;
}
.card {
  border-radius: 14px;
  padding: clamp(18px, 2.2vw, 26px);
}
.steps.card {
  padding: 0;
}
.hero {
  padding-top: clamp(60px, 8vw, 100px);
}
.hero h1 {
  text-wrap: balance;
}
.hero p {
  max-width: 52ch;
  text-wrap: pretty;
}
input:not([type="checkbox"]),
select,
textarea {
  border-radius: 10px;
  caret-color: var(--acc);
}
:focus-visible {
  outline-width: 3px;
  outline-offset: 3px;
}
.btn:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}
.card,
.btn,
.theme,
input,
select,
textarea {
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    filter 160ms ease;
}
.link {
  border-radius: 10px;
}
.big {
  font-size: clamp(40px, 10vw, 56px);
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 820px) {
  main {
    padding-inline: clamp(18px, 5vw, 36px);
  }
}
@media (max-width: 560px) {
  header {
    min-height: 60px;
    padding: 10px 18px;
  }
  .logo img {
    margin-right: 6px;
  }
  .hr {
    gap: 8px;
  }
  .hero {
    padding-top: 48px;
  }
  .hero .row .btn {
    min-height: 48px;
  }
  .narrow {
    margin: 36px auto;
  }
  .card {
    padding: 18px;
  }
  .mrow {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* Landing page: a direct handoff, drawn from the product's own mark. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  align-items: center;
  gap: clamp(24px, 4.5vw, 60px);
  position: relative;
  padding: clamp(72px, 8vw, 100px) 0 clamp(46px, 6vw, 70px);
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.hero::after {
  z-index: 2;
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: clamp(72px, 11vw, 132px);
  height: 2px;
  background: var(--acc);
}
.hero > .rise {
  display: grid;
  align-content: center;
  justify-items: start;
  min-width: 0;
}
.hero > .rise > h1 {
  max-width: 690px;
  font-size: clamp(50px, 6.2vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  text-align: left;
  text-wrap: balance;
}
.hero > .rise > p:first-of-type {
  max-width: 52ch;
  margin: 22px 0 0;
  font-size: 18px;
  line-height: 1.75;
  text-align: left;
  text-wrap: pretty;
}
.hero > .rise > .row {
  justify-content: flex-start;
  margin-top: 28px;
}
.hero .row .btn { min-height: 48px; }
.hero > .rise > p:last-child {
  margin: 24px 0 0;
  color: var(--mut);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}
h2 {
  margin-bottom: 26px;
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.18;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
section { margin-top: clamp(72px, 9vw, 108px); }
.how-top { margin-bottom: 32px; }
.how-top h2 { margin: 0; }
.steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 38px);
}
.steps > .card {
  background: linear-gradient(155deg, var(--c1), var(--c2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 28px var(--shadow);
}
.steps b {
  display: block;
  margin-bottom: 8px;
  color: var(--acc);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.steps .sh { display: block; }
.steps h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.feat h3,
.who2 h3 {
  margin: 14px 0 6px;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.steps p,
.feat p,
.who2 p,
.who2 li { line-height: 1.75; }
.who2 { gap: clamp(24px, 5vw, 64px); }
.who2 > .card {
  background: linear-gradient(155deg, var(--c1), var(--c2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: clamp(20px, 2.6vw, 30px);
  box-shadow: 0 10px 28px var(--shadow);
}
.feat > .card {
  background: linear-gradient(155deg, var(--c1), var(--c2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 28px var(--shadow);
}
.feat { gap: clamp(20px, 4vw, 48px); }
.hero + section { margin-top: clamp(58px, 7vw, 84px); }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 30px; padding-top: 62px; }
  .hero > .rise > h1 { max-width: 720px; font-size: clamp(54px, 8.2vw, 72px); }
  .hero > .rise > p:first-of-type { max-width: 58ch; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .steps .sh { display: flex; align-items: baseline; gap: 10px; }
  .steps b { display: inline-block; margin: 0; flex: none; }
}
@media (max-width: 560px) {
  .hero { gap: 20px; padding: 48px 0 38px; }
  .hero > .rise > h1 { font-size: clamp(36px, 10vw, 52px); }
  .hero > .rise > p:first-of-type { margin-top: 18px; font-size: 16px; }
  .hero > .rise > .row { margin-top: 22px; }
  .hero .row { flex-direction: column; align-items: stretch; }
  .hero .row .btn { width: 100%; }
  .hero > .rise > p:last-child { margin-top: 18px; }
  section { margin-top: 58px; }
  .hero + section { margin-top: 48px; }
  .how-top { align-items: center; }
  .how-top .btn { padding-inline: 12px; }
  .steps { grid-template-columns: 1fr; row-gap: 22px; }
  .steps > .card { padding-top: 15px; }
  .steps h3 { margin-top: 0; }
  .who2 { gap: 24px; }
  .feat { grid-template-columns: 1fr; gap: 22px; }
}

@media (min-width: 1101px) {
  main:has(> .hero) {
    max-width: 1560px;
    padding-inline: clamp(32px, 4vw, 80px);
  }
  .hero {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: clamp(44px, 4.5vw, 76px);
  }
  .hero > .rise > h1 {
    max-width: 900px;
    font-size: clamp(58px, 5vw, 86px);
  }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; gap: 30px; }
  .hero > .rise > h1 { max-width: 760px; font-size: clamp(58px, 6.5vw, 72px); }
}

/* Round 2: diagram amount, touch targets, mobile alignment */
.fl { min-height: 44px; display: flex; align-items: center; padding-block: 0; }
.mini .fl { display: inline-flex; }
@media (min-width: 821px) {
  nav a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (pointer: coarse) {
  .btn.sm { min-height: 44px; }
}
@media (max-width: 560px) {
  .how-top { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
  .hero + section { margin-top: 56px; }
}

/* Terms / Privacy: frosted panel so the page background never runs under the text */
.pdoc p { color: var(--tx) !important; opacity: 0.85; }
.pdoc p.hint { opacity: 0.6; }

/* Home refresh: Thai-first type, clear primary action, trust, FAQ, closing CTA */
h1, .hero h1, .hero > .rise > h1 { letter-spacing: 0; line-height: 1.24; }
h2, h3 { letter-spacing: 0; }
.hero > .rise > h1 { font-size: clamp(44px, 5.4vw, 72px); }
@media (min-width: 1101px) { .hero > .rise > h1 { font-size: clamp(56px, 4.6vw, 78px); } }
@media (max-width: 560px) { .hero > .rise > h1 { font-size: clamp(34px, 9.4vw, 46px); line-height: 1.28; } }
.hero .rise { animation: rise-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes rise-in { from { transform: translateY(10px); } }
.btn .ic, .resume .ic { width: 17px; height: 17px; vertical-align: -3px; margin-right: 8px; }
[data-theme="dark"] .btn:not(.ghost) { background: #4c5cf0; }
.resume-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; max-width: 100%; }
.resume { display: inline-flex; align-items: center; min-height: 40px; max-width: 100%; padding: 6px 14px 6px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--tx); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.resume span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume b { font-weight: 700; }
.resume:hover { border-color: var(--acc); }
.resume.more { color: var(--mut); background: transparent; }
.trust { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--mut); font-size: 14.5px; line-height: 1.5; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .ic { width: 17px; height: 17px; flex: none; color: var(--ok); }
@media (max-width: 560px) { .trust { flex-direction: column; gap: 10px; margin-top: 20px; } }
.tag.role { color: var(--mut); border-color: var(--line); background: transparent; }
.faq { display: grid; gap: 10px; max-width: 780px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 18px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 0; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-right: 4px; border-right: 2px solid var(--mut); border-bottom: 2px solid var(--mut); transform: translateY(-2px) rotate(45deg); transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq p { margin: 0 0 18px; color: var(--mut); line-height: 1.8; max-width: 68ch; }
.faq a, .endcta a { color: var(--acc); text-underline-offset: 3px; }
.endcta { margin-top: clamp(64px, 9vw, 110px); padding: clamp(36px, 6vw, 64px) 20px; text-align: center; border: 1px solid var(--line); border-radius: 20px; background: var(--card); }
.endcta h2 { margin: 0; text-wrap: balance; }
.endcta p { margin: 12px auto 24px; max-width: 46ch; color: var(--mut); }
.endcta .row { justify-content: center; }
.endcta .btn { min-height: 48px; padding-inline: 28px; }
.endcta + .foot { margin-top: 56px; }
a.logo { color: var(--tx); text-decoration: none; }
nav a { text-decoration: none; }
a.btn { text-decoration: none; }
.nw { display: inline-block; }
@media (max-width: 360px) { .nw { display: inline; } }
.cnote { opacity: 1; font-size: 13px; }
@media (max-width: 560px) { .cnote { font-size: 12.5px; } }
.blist { display: grid; gap: 8px; margin-top: 16px; }
.bitem { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; }
.bitem a { display: grid; min-width: 0; color: var(--tx); text-decoration: none; }
.bitem a b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bitem a:hover b { color: var(--acc); }
/* Header / bottom CTA: hidden while the hero button is on screen */
@media (min-width: 561px) {
  nav .btn { transition: opacity 0.2s; }
  body.home:not(.cta-out) nav .btn { opacity: 0; pointer-events: none; }
}
.dock { display: none; }
@media (max-width: 560px) {
  body.home nav .btn { display: none; }
  .dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--hbg); backdrop-filter: blur(12px); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
  body.home .dock { display: flex; }
  body.home.cta-out .dock { transform: none; }
  .dock .btn { flex: 1; min-height: 48px; }
  body.home .foot { padding-bottom: 76px; }
}
.mark { position: relative; display: inline-block; }
.mark svg { position: absolute; left: -2%; bottom: -0.1em; width: 104%; height: 0.3em; overflow: visible; pointer-events: none; }
.mark path { fill: none; stroke: var(--ok); stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; animation: mark-draw 0.75s cubic-bezier(0.65, 0, 0.35, 1) 0.6s forwards; }
@media (max-width: 560px) { .mark path { stroke-width: 4.5; } }
@keyframes mark-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .mark path { stroke-dashoffset: 0; } }
/* Status palette (one set for the whole app): --ok/--warn/--bad = text on light tints, --*-solid = fills under white text */
:root { --ok-solid: #0b7a53; --warn-solid: #a85a06; --bad-solid: #b8334e; --field-line: #536a9e; }
[data-theme="light"] { --field-line: #7a8aa1; }
/* Fields: visible edges (3:1), a clear focus ring, inline errors */
input:not([type="checkbox"]), select, textarea { border-color: var(--field-line); transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
input:not([type="checkbox"]):hover, select:hover, textarea:hover { border-color: var(--mut); }
input:not([type="checkbox"]):focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 24%, transparent); outline: 0; }
.is-err, input.is-err:not([type="checkbox"]), textarea.is-err { border-color: var(--bad); }
input.is-err:focus, textarea.is-err:focus { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
div.is-err { border-radius: 12px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--bad) 55%, transparent); }
.ferr { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--bad); font-size: 13.5px; font-weight: 700; }
.ferr::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* Money: baht sign inside the field, right-aligned tabular figures like a receipt */
.money { position: relative; }
.money > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mut); font-weight: 700; pointer-events: none; }
.money > input { padding-left: 32px; }
.calc { text-align: right; font-variant-numeric: tabular-nums; }
.mrow .a, .split b, .big { font-variant-numeric: tabular-nums; }
/* Calmer surfaces: the gradient wash stays behind the top of the page only; cards are flat */
body::before { position: absolute; inset: 0 0 auto 0; height: 1100px; -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent); }
.card, .steps > .card, .who2 > .card, .feat > .card { background: var(--card); }
.noscript { max-width: 520px; margin: 80px auto; padding: 0 20px; text-align: center; color: var(--tx); }
/* Hero v3: the bill as a real receipt; each confirmed payment lands on it as an ink stamp */
.hero > .rise > h1 { font-size: clamp(44px, 6vw, 80px); }
@media (min-width: 1101px) { .hero > .rise > h1 { font-size: clamp(68px, 5.6vw, 96px); } }
@media (max-width: 560px) { .hero > .rise > h1 { font-size: clamp(38px, 11vw, 50px); } }
.mark path { stroke-width: 8; }
@media (max-width: 560px) { .mark path { stroke-width: 5.5; } }
/* Hero: the YouTube clip, 16:9, in the column the receipt used to fill */
.hero-video { position: relative; width: 100%; max-width: 560px; justify-self: center; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 26px 34px var(--shadow), 0 2px 3px var(--shadow); }
.hero-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 1101px) { .hero-video { max-width: 620px; } }
@media (max-width: 900px) { .hero-video { max-width: 640px; justify-self: start; } }
@media (max-width: 560px) { .hero-video { border-radius: 12px; } }

/* Bolder pass: receipt perforations and indigo carry down the whole page */
:root { --band: #4c5cf0; --band-2: #3443c9; --on-band: #ffffff; --band-mut: #eef0ff; --band-num: #d6dcff; }
[data-theme="light"] { --band: #394bc6; --band-2: #2a3aa8; --band-mut: #e3e7ff; --band-num: #d6dcff; }
[data-theme="light"] { --g2: #5262df80; --g3: #2fb98a3a; }
body { overflow-x: clip; }
.zig { --z: 10px;
  -webkit-mask: radial-gradient(circle at 50% 0, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 0 / calc(var(--z) * 2) 51% repeat-x, radial-gradient(circle at 50% 100%, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 100% / calc(var(--z) * 2) 51% repeat-x;
  mask: radial-gradient(circle at 50% 0, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 0 / calc(var(--z) * 2) 51% repeat-x, radial-gradient(circle at 50% 100%, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 100% / calc(var(--z) * 2) 51% repeat-x; }
.hero { border-bottom: 0; }
.hero::after { display: none; }

/* How it works: a full-bleed indigo receipt strip, steps torn apart by perforations */
#how {
  --z: 10px;
  margin-inline: calc(50% - 50vw);
  padding: clamp(64px, 8vw, 112px) calc(50vw - 50%) clamp(64px, 8vw, 104px);
  color: var(--on-band);
  background:
    radial-gradient(ellipse 60% 90% at 100% 0%, #ffffff1f, transparent 70%),
    linear-gradient(135deg, var(--band), var(--band-2));
  -webkit-mask: radial-gradient(circle at 50% 0, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 0 / calc(var(--z) * 2) 51% repeat-x, radial-gradient(circle at 50% 100%, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 100% / calc(var(--z) * 2) 51% repeat-x;
  mask: radial-gradient(circle at 50% 0, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 0 / calc(var(--z) * 2) 51% repeat-x, radial-gradient(circle at 50% 100%, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 100% / calc(var(--z) * 2) 51% repeat-x;
}
#how .how-top { margin-bottom: clamp(36px, 5vw, 60px); }
#how h2 { color: var(--on-band); font-size: clamp(32px, 4.2vw, 52px); }
#how .steps { gap: 0; row-gap: 0; }
.stp { position: relative; padding: 4px clamp(18px, 2.4vw, 34px) 8px; }
.stp:first-child { padding-left: 0; }
.stp + .stp { border-left: 2px dashed #ffffff47; }
#how .steps .sh { display: block; }
#how .steps b {
  display: block;
  margin: 0 0 14px;
  color: var(--band-num);
  font-size: clamp(56px, 6vw, 92px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}
#how .steps h3 { margin: 0 0 8px; font-size: clamp(19px, 1.6vw, 22px); color: var(--on-band); }
#how .steps p { color: var(--band-mut); font-size: 15px; }
.stp-stamp, .end-stamp { position: absolute; pointer-events: none; }
.stp-stamp { right: clamp(6px, 1.4vw, 20px); top: clamp(10px, 1.6vw, 22px); }
.stp-stamp > span, .end-stamp > span {
  display: block;
  rotate: -11deg;
  padding: 0 12px;
  border: 2.5px solid currentColor;
  border-radius: 8px;
  outline: 1px solid currentColor;
  outline-offset: -6px;
  color: #7ff0bf;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.9;
  white-space: nowrap;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='70'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 0 0 0 1.95'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='70'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.2 0 0 0 1.95'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (max-width: 900px) {
  #how .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stp { padding: 24px clamp(18px, 3vw, 28px) 24px; }
  .stp:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stp:nth-child(n + 3) { border-top: 2px dashed #ffffff47; }
}
@media (max-width: 560px) {
  #how .steps { grid-template-columns: 1fr; }
  #how .stp { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 14px; padding: 22px 0; border-left: 0; }
  .stp + .stp { border-top: 2px dashed #ffffff47; }
  .stp:first-child { padding-top: 0; }
  #how .steps .sh { display: contents; }
  #how .steps b { grid-row: span 2; margin: 0; font-size: 50px; }
  #how .steps h3 { align-self: end; }
  .stp-stamp { top: auto; bottom: 14px; right: 0; }
  .stp-stamp > span { font-size: 14px; }
}

/* Notifications: the alert the host gets the moment someone reports a transfer */
.ntf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 6vw, 96px); }
.ntf-beta { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 16px; padding: 4px 13px 4px 10px; border-radius: 99px; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); font-size: 14px; font-weight: 700; }
.ntf-beta .ic { width: 16px; height: 16px; }
.ntf h2 { margin-bottom: 16px; font-size: clamp(32px, 4.2vw, 52px); }
.ntf-copy > p { color: var(--mut); font-size: 17px; max-width: 46ch; }
.ntf-ch { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.ntf-ch li { display: flex; align-items: flex-start; gap: 14px; }
.ntf-ch .ic { flex: none; width: 42px; height: 42px; padding: 10px; border-radius: 12px; color: var(--acc); background: color-mix(in srgb, var(--acc) 13%, var(--card)); }
.ntf-ch li + li .ic { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, var(--card)); }
.ntf-ch span { display: grid; color: var(--mut); font-size: 15px; line-height: 1.5; }
.ntf-ch b { color: var(--tx); font-size: 16.5px; }
.ntf-how { margin-top: 22px; padding-top: 18px; border-top: 1.5px dashed var(--line); color: var(--mut); font-size: 15px; max-width: 50ch; }
.ntf-how b { color: var(--tx); }
.ntf-art { position: relative; display: grid; gap: 18px; padding: clamp(28px, 4vw, 52px) clamp(18px, 3vw, 40px); border-radius: 24px; background:
    radial-gradient(ellipse 70% 70% at 100% 0%, color-mix(in srgb, var(--ok) 22%, transparent), transparent 70%),
    radial-gradient(ellipse 80% 80% at 0% 100%, color-mix(in srgb, var(--acc) 26%, transparent), transparent 70%),
    color-mix(in srgb, var(--acc) 7%, var(--bg)); }
.nt { position: relative; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 18px 40px var(--shadow), 0 2px 4px var(--shadow); font-size: 14.5px; line-height: 1.5; }
.nt-mail { rotate: -1.5deg; margin-right: clamp(0px, 4vw, 48px); }
.nt-2 { rotate: 1.2deg; margin-left: clamp(0px, 4vw, 48px); }
.nt-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--mut); font-size: 13px; font-weight: 700; }
.nt-h .ic { width: 22px; height: 22px; padding: 4px; border-radius: 7px; color: #fff; background: var(--acc); }
.nt-2 .nt-h .ic { background: var(--ok-solid); }
.nt-h small { margin-left: auto; font-weight: 500; font-size: 12.5px; }
.nt > b { display: block; font-size: 16px; }
.nt > p { color: var(--mut); }
.nt-amt { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 10px; border-top: 1.5px dashed var(--line); color: var(--mut); }
.nt-amt b { color: var(--tx); font-size: 22px; font-variant-numeric: tabular-nums; }
.nt dl { display: flex; gap: 28px; margin: 8px 0 0; }
.nt dt { color: var(--mut); font-size: 12.5px; }
.nt dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.nt-mail::after { content: ""; position: absolute; top: -5px; right: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bad-solid); box-shadow: 0 0 0 3px var(--card); }
.ntf.in .nt { animation: nt-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
.ntf.in .nt-2 { animation-delay: 0.45s; }
.ntf.in .nt-mail::after { animation: nt-dot 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.55s both; }
@keyframes nt-in { from { opacity: 0; translate: 0 -18px; scale: 0.96; filter: blur(4px); } }
@keyframes nt-dot { from { scale: 0; } }
@media (min-width: 901px) { .ntf { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); } .ntf-art { order: -1; } .ntf-art .nt-mail { rotate: 1.5deg; } .ntf-art .nt-2 { rotate: -1.2deg; } }
@media (max-width: 900px) { .ntf { grid-template-columns: 1fr; } .ntf-art { max-width: 560px; } }
/* FAQ grouped by moment of use */
.faq { max-width: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px); align-items: start; }
.faq-g { display: grid; gap: 10px; }
.faq-g:nth-child(2) { grid-row: span 2; }
.faq-g h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--acc); }
@media (max-width: 900px) { .faq { grid-template-columns: 1fr; } .faq-g:nth-child(2) { grid-row: auto; } }
@media (max-width: 560px) { .ntf-copy > p { font-size: 16px; } .ntf-art { padding: 24px 16px; border-radius: 20px; } .nt-mail, .nt-2 { margin-inline: 0; } }

/* Theme switch: circular reveal from the button (View Transitions), icon spins in */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }
.theme { overflow: hidden; }
.theme.flip svg { animation: theme-spin 0.7s cubic-bezier(0.34, 1.4, 0.5, 1) both; }
.theme:active svg { scale: 0.85; }
@keyframes theme-spin { from { opacity: 0; rotate: -150deg; scale: 0.3; translate: 0 10px; } }
/* Bill links and the demo open straight into the app: keep the static home copy out of sight until it renders */
html.app-boot #app { visibility: hidden; }

/* Payment overview: a payer row is a clear expandable row, not a bullet */
.grp summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 30px; align-items: center; gap: 10px; min-height: 60px; margin: 0 -10px; padding: 10px; border-radius: 12px; transition: background-color 160ms ease; }
.grp summary::before, .grp[open] summary::before { content: none; }
.grp summary:hover { background: var(--chip); }
.grp summary:active { background: color-mix(in srgb, var(--acc) 12%, var(--chip)); }
.grp summary .n { display: grid; line-height: 1.35; }
.grp summary .n small { color: var(--acc); font-size: 13px; font-weight: 500; }
.grp summary::after { content: ""; grid-column: 4; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6cff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat; transition: rotate 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 160ms ease; }
.grp summary:hover::after { border-color: var(--acc); }
.grp[open] summary::after { rotate: 180deg; background-color: color-mix(in srgb, var(--acc) 14%, var(--card)); border-color: var(--acc); }
.grp[open] { margin: 0 -10px 8px; padding: 0 10px 6px; border-radius: 14px; background: color-mix(in srgb, var(--acc) 6%, transparent); }
.grp[open] summary { margin: 0 -10px; }
.grp .mrow { margin-left: 0; padding-left: 12px; }
@media (max-width: 380px) { .grp summary { grid-template-columns: minmax(0, 1fr) auto 30px; } .grp summary .tag { grid-column: 1 / 3; grid-row: 2; justify-self: start; } .grp summary::after { grid-row: 1 / 3; grid-column: 3; } }

/* Several payers: the bill's own maths, shown as a receipt that nets out to two transfers */
.settle { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; gap: clamp(36px, 6vw, 96px); }
.settle h2 { margin-bottom: 16px; font-size: clamp(30px, 3.8vw, 48px); }
.settle-copy > p { color: var(--mut); font-size: 17px; max-width: 52ch; }
.perks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.perks li { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: start; gap: 14px; }
.perks li > .ic, .perks code { justify-self: start; height: 40px; border-radius: 12px; color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--acc) 28%, transparent); }
.perks li > .ic { width: 40px; padding: 9px; }
.perks code { display: inline-grid; place-items: center; padding: 0 9px; font: 700 14.5px/1 "Plus Jakarta Sans", sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.perks span { display: grid; color: var(--mut); font-size: 15px; line-height: 1.55; }
.perks b { color: var(--tx); font-size: 16.5px; }
.ledger { --z: 9px; padding: 34px clamp(20px, 2.6vw, 32px); background: var(--card); rotate: 1.5deg; filter: drop-shadow(0 24px 32px var(--shadow)) drop-shadow(0 2px 3px var(--shadow)); font-variant-numeric: tabular-nums; }
[data-theme="dark"] .ledger { background: #17234a; }
/* The receipt sits on a tinted panel so the white paper never melts into the page */
.settle-art { display: grid; place-items: center; padding: clamp(28px, 4vw, 52px) clamp(18px, 3vw, 40px); border-radius: 24px; background:
    radial-gradient(ellipse 70% 70% at 0% 0%, color-mix(in srgb, var(--acc) 24%, transparent), transparent 70%),
    radial-gradient(ellipse 80% 80% at 100% 100%, color-mix(in srgb, var(--ok) 20%, transparent), transparent 70%),
    color-mix(in srgb, var(--acc) 8%, var(--bg)); }
.settle-art .ledger { width: 100%; max-width: 440px; }
.lg-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1.5px dashed var(--line); }
.lg-h b { font-size: 18px; }
.lg-h span { color: var(--mut); font-size: 14px; }
.lg-paid { list-style: none; margin: 0; padding: 10px 0; display: grid; gap: 4px; }
.lg-paid li, .lg-tx { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.lg-paid span { flex: 1; color: var(--mut); }
.lg-paid b { font-weight: 700; }
.ledger i { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; font-style: normal; font-size: 13.5px; font-weight: 700; color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); }
.ledger i.to { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.lg-each { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-block: 1.5px dashed var(--line); color: var(--mut); font-weight: 700; }
.lg-each b { color: var(--tx); font-size: 24px; }
.lg-out { margin-top: 14px; padding: 14px 14px 8px; border-radius: 14px; background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1.5px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.lg-t { display: block; margin-bottom: 4px; color: var(--ok); font-size: 14px; font-weight: 700; }
.lg-tx span { font-weight: 700; }
.lg-tx .ic { width: 20px; height: 20px; color: var(--mut); flex: none; }
.lg-tx b { margin-left: auto; font-size: 20px; }
@media (max-width: 900px) { .settle { grid-template-columns: 1fr; } .settle-art { max-width: 560px; width: 100%; justify-self: center; } }
@media (max-width: 560px) { .settle-copy > p { font-size: 16px; } .perks li { grid-template-columns: 70px minmax(0, 1fr); gap: 12px; } .perks code { padding: 0 7px; font-size: 13px; } .ledger { rotate: 0.8deg; } .settle-art { padding: 24px 16px; border-radius: 20px; } }

/* Use cases: the words people actually search, set as a ruled list rather than cards */
.use-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 56px); border-top: 2px solid var(--tx); }
.use-grid > div { padding: 22px 0 24px; border-bottom: 1.5px dashed var(--line); }
.use-grid h3 { margin: 0 0 6px; font-size: 19px; }
.use-grid h3::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 3px; background: var(--acc); rotate: 45deg; vertical-align: 2px; }
.use-grid > div:nth-child(3n + 2) h3::before { background: var(--ok); }
.use-grid > div:nth-child(3n) h3::before { background: var(--warn); }
.use-grid p { color: var(--mut); font-size: 15px; line-height: 1.7; }
@media (max-width: 900px) { .use-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .use-grid { grid-template-columns: 1fr; } .use-grid > div { padding: 18px 0 20px; } }

/* Who sees what: two distinct parties, two distinct colours */
.who2 > .card { position: relative; overflow: hidden; border-width: 1.5px; }
.who2 > .card:first-child { border-color: color-mix(in srgb, var(--acc) 40%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--acc) 13%, var(--card)), var(--card) 70%); }
.who2 > .card:last-child { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--ok) 12%, var(--card)), var(--card) 70%); }
.who2 .tag.role { font-size: 14px; padding: 4px 14px; border: 0; color: #fff; }
.who2 > .card:first-child .tag.role { background: var(--acc); }
.who2 > .card:last-child .tag.role { background: var(--ok-solid); }
.who2 h3 { font-size: clamp(22px, 2.2vw, 28px); margin-top: 18px; }
.who2 ul { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 8px; }
.who2 li { display: flex; gap: 10px; color: var(--tx) !important; }
.who2 li { position: relative; }
.who2 li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 4px; border-radius: 50%; background: color-mix(in srgb, var(--c, var(--acc)) 16%, transparent); }
.who2 li::after { content: ""; position: absolute; left: 6px; top: 10px; width: 8px; height: 4.5px; border-left: 2px solid var(--c, var(--acc)); border-bottom: 2px solid var(--c, var(--acc)); rotate: -45deg; }
.who2 > .card:last-child li { --c: var(--ok); }

/* FAQ: the open answer lights up */
.faq details { transition: border-color 160ms ease, box-shadow 160ms ease; }
.faq summary:hover { color: var(--acc); }
.faq details[open] { border-color: color-mix(in srgb, var(--acc) 50%, transparent); box-shadow: 0 12px 30px var(--shadow); }
.faq details[open] summary { color: var(--acc); }
.faq details[open] summary::after { border-color: var(--acc); }

/* Closing CTA: a big indigo receipt with the final stamp on it */
.endcta {
  --z: 10px;
  position: relative;
  padding: clamp(56px, 8vw, 96px) 20px;
  border: 0;
  border-radius: 0;
  color: var(--on-band);
  background:
    radial-gradient(ellipse 50% 80% at 0% 100%, #2fe3a12e, transparent 70%),
    radial-gradient(ellipse 60% 90% at 100% 0%, #ffffff24, transparent 70%),
    linear-gradient(135deg, var(--band), var(--band-2));
  -webkit-mask: radial-gradient(circle at 50% 0, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 0 / calc(var(--z) * 2) 51% repeat-x, radial-gradient(circle at 50% 100%, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 100% / calc(var(--z) * 2) 51% repeat-x;
  mask: radial-gradient(circle at 50% 0, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 0 / calc(var(--z) * 2) 51% repeat-x, radial-gradient(circle at 50% 100%, #0000 calc(var(--z) * 0.6), #000 calc(var(--z) * 0.6 + 0.5px)) 50% 100% / calc(var(--z) * 2) 51% repeat-x;
}
.endcta h2 { color: var(--on-band); font-size: clamp(30px, 4.4vw, 56px); max-width: 20ch; margin-inline: auto; }
.endcta p { color: var(--band-mut); font-size: 17px; }
.endcta .btn, [data-theme="dark"] .endcta .btn:not(.ghost) { background: #fff; color: var(--band-2); min-height: 54px; padding-inline: 34px; font-size: 17px; box-shadow: 0 14px 30px #0b124a55; }
.endcta .btn:hover { filter: none; background: #eef0ff; }
.end-stamp { right: clamp(14px, 6vw, 90px); top: clamp(22px, 4vw, 48px); }
.end-stamp > span { font-size: clamp(16px, 1.8vw, 22px); rotate: 9deg; }
@media (max-width: 560px) { .end-stamp { top: 18px; right: 14px; } .endcta { padding-top: 76px; } }

/* A button waiting for the server (busy() in js/app.js): locked, with a spinner next to its label */
.btn.busy { pointer-events: none; opacity: 0.75; cursor: progress; }
.btn.busy::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: btn-spin 0.8s linear infinite; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.busy::before { animation: none; } }
