/* Landing + docs + auth pages */
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .72); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { color: var(--fg-2); text-decoration: none; font-size: 15px; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover { color: var(--fg); background: var(--muted); }
.nav-cta { margin-left: auto; display: flex; gap: 8px; }
.nav-login { display: none; }
.nav-toggle { display: none; width: 44px; height: 44px; flex: none; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--fg); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-toggle .i-close, .nav.open .nav-toggle .i-open { display: none; }
.nav.open .nav-toggle .i-close { display: inline; }
@media (max-width: 1020px) {
  .nav .wrap { gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0; flex-direction: column; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; box-shadow: 0 16px 32px rgba(16, 36, 26, .10); }
  .nav.open .nav-links { display: flex; animation: rise .2s var(--ease); }
  .nav-links a { font-size: 17px; padding: 13px 12px; }
}
@media (max-width: 520px) {
  .nav-cta .btn.ghost { display: none; }
  .nav-cta .btn { padding: 10px 14px; }
  .nav-links .nav-login { display: block; font-weight: 600; color: var(--accent-ink, var(--fg)); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 16px; }
  .code pre { font-size: 13px; }
}

/* hero */
.hero { padding: 72px 0 56px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 520px; pointer-events: none;
  background: radial-gradient(600px 300px at 30% 30%, rgba(20, 201, 160, .12), transparent 70%);
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-ink); font-size: 14px; font-weight: 600; padding: 4px 12px; border: 1px solid rgba(20, 201, 160, .3); border-radius: 999px; background: var(--accent-soft); }
.hero h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 700; margin: 18px 0 16px; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 18px; color: var(--fg-2); max-width: 34em; }
.hero .cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero .proof { display: flex; gap: 20px; margin-top: 28px; color: var(--fg-3); font-size: 14px; flex-wrap: wrap; }
.hero .proof span { display: inline-flex; align-items: center; gap: 6px; }
.hero .proof .ico { color: var(--accent); width: 16px; height: 16px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* chat preview */
.chat { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); max-width: 420px; justify-self: center; width: 100%; }
.chat-top { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; font-size: 14px; }
.chat-av { width: 34px; height: 34px; border-radius: 50%; background: var(--muted); display: grid; place-items: center; color: var(--accent); }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55; margin-bottom: 10px; }
.bubble.me { margin-left: auto; background: #eef2f7; color: var(--fg); border-bottom-right-radius: 4px; }
.bubble.bot { background: #dcfaf1; border: 1px solid rgba(20, 201, 160, .3); border-bottom-left-radius: 4px; color: #0d4236; }
.bubble.bot.warn { background: #fff4d9; border-color: rgba(245, 165, 36, .4); color: #6b4300; }
/* demo slip inside the chat (made-up bank and data, clearly marked as an example) */
.slip-thumb { position: relative; width: 218px; margin: 0 0 12px auto; padding: 14px 14px 18px; background: #fff; color: var(--fg); border-radius: 14px 14px 4px 4px; border: 1px solid #e6efea; box-shadow: 0 10px 26px rgba(16, 36, 26, .12); overflow: hidden; font-size: 12px; line-height: 1.35;
  -webkit-mask: radial-gradient(5px at 50% 100%, transparent 98%, #000) 0 0 / 12px 100% repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 5px) no-repeat;
          mask: radial-gradient(5px at 50% 100%, transparent 98%, #000) 0 0 / 12px 100% repeat-x, linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 5px) no-repeat; }
.slip-thumb::before { content: "ตัวอย่าง"; position: absolute; top: 46%; left: 50%; translate: -50% -50%; rotate: -24deg; font-size: 30px; font-weight: 800; color: rgba(20, 201, 160, .08); pointer-events: none; }
.sq-head { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px dashed #dbe7e1; }
.sq-head b { display: block; font-size: 12.5px; } .sq-head small { color: var(--fg-3); font-size: 10.5px; }
.sq-bank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #34dcb6, #0ea888); color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.sq-ok { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-weight: 700; font-size: 13.5px; color: var(--accent-ink); }
.sq-ok span { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; }
.sq-date { color: var(--fg-3); font-size: 11px; margin: 2px 0 8px; }
.sq-party { display: grid; padding: 6px 8px; background: #f5faf8; border-radius: 8px; }
.sq-party small { color: var(--fg-3); font-size: 10px; } .sq-party b { font-size: 12.5px; } .sq-party span { font-family: var(--mono); font-size: 10.5px; color: var(--fg-2); }
.sq-arrow { text-align: center; color: var(--accent); font-weight: 700; line-height: 1; margin: 2px 0; }
.sq-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed #dbe7e1; }
.sq-foot small { display: block; color: var(--fg-3); font-size: 10px; }
.sq-amt { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.sq-amt::after { content: " บาท"; font-size: 11px; font-weight: 600; color: var(--fg-2); }
.sq-qr { width: 54px; height: 54px; flex: none; border-radius: 4px; }
.bubble b { color: inherit; }
.chat-meta { font-size: 12px; color: var(--fg-3); text-align: right; margin: -4px 0 10px; }

/* sections */
section.block { padding: 72px 0; border-top: 1px solid var(--line); }
.sec-head { max-width: 640px; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; margin-bottom: 10px; }
.sec-head p { color: var(--fg-3); font-size: 17px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid3 { grid-template-columns: 1fr; } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; transition: border-color .2s var(--ease); }
.feature:hover { border-color: var(--line-strong); }
.feature .fi { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--fg-3); font-size: 15px; }

.steps { counter-reset: step; display: grid; gap: 14px; }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.step::before { counter-increment: step; content: counter(step); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--accent); font-weight: 700; font-family: var(--mono); }
.step h3 { font-size: 17px; margin: 6px 0 4px; }
.step p { color: var(--fg-3); font-size: 15px; }

/* pricing */
.price { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.price.hot { border-color: rgba(20, 201, 160, .55); box-shadow: 0 0 0 1px rgba(20, 201, 160, .25), var(--shadow); }
.price h3 { font-size: 18px; }
.price .amt { font-size: 36px; font-weight: 700; letter-spacing: -.02em; }
.price .amt small { font-size: 15px; color: var(--fg-3); font-weight: 500; }
.price ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--fg-2); font-size: 15px; }
.price li { display: flex; gap: 8px; }
.price li .ico { color: var(--accent); width: 18px; height: 18px; margin-top: 3px; }
.price .btn { margin-top: auto; }

/* faq */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 44px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--fg-3); font-size: 20px; font-weight: 400; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--fg-3); padding: 0 0 16px; font-size: 15px; }

.cta-band { text-align: center; padding: 56px 24px; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(500px 200px at 50% 0%, rgba(20, 201, 160, .14), transparent 70%), var(--card); }
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 10px; }
.cta-band p { color: var(--fg-3); margin-bottom: 22px; }

footer.site { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--fg-3); font-size: 14px; }
footer.site .wrap { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
footer.site a { color: var(--fg-2); text-decoration: none; }
footer.site a:hover { color: var(--fg); }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: radial-gradient(600px 300px at 50% 0%, rgba(20, 201, 160, .10), transparent 70%), var(--bg); }
.auth-card { width: min(420px, 100%); }
.auth-card .card { padding: 28px; }
.auth-card h1 { font-size: 24px; margin: 22px 0 6px; }
.auth-card .sub { color: var(--fg-3); margin-bottom: 22px; font-size: 15px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--fg-3); font-size: 15px; }

/* legal + about pages */
.legal { max-width: 820px; padding: 48px 0 80px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 8px; }
.legal .updated { color: var(--fg-3); font-size: 14px; margin-bottom: 28px; }
.legal h2 { font-size: 21px; margin: 36px 0 12px; scroll-margin-top: 88px; }
.legal h3 { font-size: 17px; margin: 20px 0 8px; }
.legal p, .legal li { color: var(--fg-2); }
.legal p + p { margin-top: 10px; }
.legal ul, .legal ol { padding-left: 22px; display: grid; gap: 6px; margin: 10px 0; }
.legal table { margin: 12px 0; }
.legal .toc-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.legal .toc-box ol { margin: 6px 0 0; }
.legal .toc-box a { color: var(--fg-2); text-decoration: none; }
.legal .toc-box a:hover { color: var(--accent); }
mark.fill { background: rgba(251, 179, 21, .18); color: #74470a; border-radius: 4px; padding: 0 4px; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.about-stats div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.about-stats b { display: block; font-size: 26px; color: var(--fg); }
.about-stats span { color: var(--fg-3); font-size: 14px; }
@media (max-width: 600px) { .about-stats { grid-template-columns: 1fr; } }

/* docs */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 40px; padding: 40px 0 80px; }
.docs nav.toc { position: sticky; top: 88px; align-self: start; display: grid; gap: 2px; }
.docs nav.toc a { color: var(--fg-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 7px 10px; border-radius: 8px; }
.docs nav.toc a:hover { color: var(--fg); background: var(--muted); }
.docs nav.toc .grp { font-size: 12px; font-weight: 700; color: #8a9b93; text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 4px; }
.docs article { min-width: 0; }
.docs article section { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); scroll-margin-top: 88px; }
.docs h1 { font-size: 34px; margin-bottom: 10px; }
.docs h2 { font-size: 24px; margin-bottom: 12px; }
.docs h3 { font-size: 19px; margin: 22px 0 10px; }
.docs p, .docs li { color: var(--fg); font-size: 17px; }
.docs p + p { margin-top: 10px; }
.docs ul { padding-left: 20px; }
.docs .code { margin: 12px 0; }
.docs table { margin: 12px 0; }
.endpoint { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin: 6px 0 4px; }
.method { font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
.method.get { background: var(--t-blue-soft); color: #1d4ed8; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 12px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--fg-3); font: inherit; font-size: 14px; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; min-height: 44px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.tab-panel[hidden] { display: none; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .docs nav.toc { display: none; } }

/* LINE QR contact popup */
.line-qr-btn { font: inherit; font-weight: 600; color: #fff; background: #06c755; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; min-height: 40px; }
.line-qr-btn:hover { background: #05b04b; }
.line-qr-dialog { border: 0; border-radius: 20px; padding: 28px 24px 24px; width: min(340px, calc(100% - 32px)); text-align: center; box-shadow: 0 24px 60px rgba(16, 36, 26, .25); }
.line-qr-dialog::backdrop { background: rgba(16, 36, 26, .45); }
.line-qr-dialog[open] { animation: rise .25s var(--ease); }
.line-qr-dialog h2 { margin: 0 0 6px; font-size: 22px; }
.line-qr-dialog p { margin: 0 0 16px; color: var(--fg-2); }
.line-qr-dialog img { display: block; margin: 0 auto 18px; width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: #fff; }
.line-qr-dialog .lq-close { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--fg-3); cursor: pointer; border-radius: 10px; }
.line-qr-dialog .lq-close:hover { background: var(--muted); }
