/* checkbill-pos.com — shared styles. Colours and type follow the app (accent #5B4BD5, IBM Plex Sans Thai). */
@font-face { font-family: "Plex Thai"; font-weight: 400; font-display: swap; src: url("/assets/fonts/IBMPlexSansThai-Regular.ttf") format("truetype"); }
@font-face { font-family: "Plex Thai"; font-weight: 600; font-display: swap; src: url("/assets/fonts/IBMPlexSansThai-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Plex Thai"; font-weight: 700; font-display: swap; src: url("/assets/fonts/IBMPlexSansThai-Bold.ttf") format("truetype"); }

:root {
  --accent: #5B4BD5;
  --accent-dark: #4335B8;
  --accent-soft: #EFEDFB;
  --ink: #1A1C21;
  --muted: #5F6470;
  --line: #E6E8EC;
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --device: #1E1B3A;
  --ok: #1E8E5A;
  --ok-soft: #E7F5EE;
  --warn: #9A5B00;
  --warn-soft: #FDF1E2;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(26, 28, 33, 0.04), 0 8px 24px rgba(26, 28, 33, 0.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Plex Thai", "Noto Sans Thai", "Sukhumvit Set", "Thonburi", "Leelawadee UI", system-ui, sans-serif;
  font-size: 17px; line-height: 1.75;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 30; background: #fff; padding: 8px 14px; border-radius: 10px; }
:focus-visible { outline: 3px solid rgba(91, 75, 213, 0.45); outline-offset: 2px; border-radius: 6px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 21px; letter-spacing: -0.2px; }
.logo:hover { color: var(--ink); }
.logo svg { flex: none; }
.site-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; padding: 8px 12px; border-radius: 10px; }
.site-nav a:hover { background: var(--bg); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav .btn { padding: 8px 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--accent); color: #fff !important; text-decoration: none; font-weight: 600; font-size: 17px; line-height: 1.2; padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.btn:hover { background: var(--accent-dark); }
.btn:active { transform: translateY(1px); }
.btn-light { background: #fff; color: var(--accent) !important; }
.btn-light:hover { background: #F3F1FF; }
.btn-ghost { background: rgba(255, 255, 255, 0.14); color: #fff !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.24); }
.btn-outline { background: #fff; color: var(--accent) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn small { display: block; font-size: 12px; font-weight: 400; opacity: 0.8; }
.btn .play { width: 22px; height: 22px; flex: none; }

/* Hero */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 120% at 10% 0%, #7062E3 0%, var(--accent) 45%, var(--accent-dark) 100%); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.06); }
.hero::before { width: 520px; height: 520px; right: -160px; top: -220px; }
.hero::after { width: 320px; height: 320px; left: -140px; bottom: -160px; }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 40px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.eyebrow { display: inline-block; font-weight: 600; font-size: 15px; background: rgba(255, 255, 255, 0.16); padding: 5px 14px; border-radius: 999px; }
.hero h1 { font-size: 50px; line-height: 1.2; margin: 18px 0 14px; letter-spacing: -0.5px; }
.hero h1 em { font-style: normal; background: #fff; color: var(--accent-dark); border-radius: 14px; padding: 0 12px; margin: 0 2px; }
.hero .lead { font-size: 19px; opacity: 0.94; margin: 0 0 26px; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; background: rgba(255, 255, 255, 0.14); border-radius: 999px; padding: 5px 14px; }
.devices { position: relative; padding-bottom: 30px; }
.tablet { background: var(--device); padding: 12px; border-radius: 26px; box-shadow: 0 30px 70px rgba(20, 10, 80, 0.45); }
.tablet img { border-radius: 16px; }
.devices .phone { position: absolute; right: -14px; bottom: -10px; width: 31%; transform: rotate(5deg); }
.phone { background: var(--device); padding: 7px; border-radius: 26px; box-shadow: 0 18px 50px rgba(20, 10, 80, 0.5); }
.phone img { border-radius: 20px; }

/* Sections */
.section { padding: 80px 0; }
.section.white { background: #fff; }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: 36px; line-height: 1.3; margin: 0 0 10px; letter-spacing: -0.3px; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.pillar h3, .feature h3 { font-size: 20px; margin: 14px 0 6px; line-height: 1.4; }
.pillar p { margin: 0; color: var(--muted); }
.icon { width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; }
.feature ul { margin: 6px 0 16px; padding-left: 20px; color: var(--muted); font-size: 16px; }
.feature li { margin: 4px 0; }
.feature .more { margin-top: auto; font-weight: 600; text-decoration: none; font-size: 16px; }
.feature .more::after { content: " →"; }

.showcase { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: start; }
.showcase figure { margin: 0; }
.showcase figcaption { text-align: center; margin-top: 12px; font-weight: 600; font-size: 16px; }
.showcase figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.split h2 { font-size: 32px; line-height: 1.35; margin: 0 0 12px; }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; }
.checklist li { position: relative; padding-left: 36px; margin: 12px 0; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%231E8E5A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.checklist small { display: block; color: var(--muted); font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }

.faq { max-width: 780px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 22px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

.cta { text-align: center; color: #fff; background: radial-gradient(120% 140% at 50% 0%, #7062E3 0%, var(--accent) 50%, var(--accent-dark) 100%); border-radius: 28px; padding: 56px 24px; }
.cta h2 { font-size: 34px; margin: 0 0 8px; }
.cta p { margin: 0 0 26px; opacity: 0.92; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Guide */
.guide-hero { background: #fff; border-bottom: 1px solid var(--line); padding: 44px 0 36px; }
.guide-hero h1 { font-size: 40px; line-height: 1.3; margin: 0 0 8px; }
.guide-hero p { color: var(--muted); margin: 0; font-size: 18px; max-width: 46em; }
.crumbs { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding-top: 40px; padding-bottom: 80px; }
.topic { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s; }
.topic:hover { color: var(--ink); border-color: #CFC9F4; box-shadow: var(--shadow); }
.topic .num { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; }
.topic h2 { font-size: 18px; line-height: 1.4; margin: 6px 0 4px; }
.topic p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; padding-top: 40px; padding-bottom: 80px; }
.guide-nav { position: sticky; top: 90px; align-self: start; font-size: 15px; }
.guide-nav-mobile { display: none; }
.guide-nav ol { list-style: none; margin: 0; padding: 0; }
.guide-nav a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; line-height: 1.45; }
.guide-nav a:hover { background: #fff; }
.guide-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.guide-nav .all { color: var(--muted); margin-bottom: 6px; }

.article { max-width: 760px; }
.article h1 { font-size: 36px; line-height: 1.3; margin: 0 0 8px; }
.article .desc { color: var(--muted); font-size: 18px; margin: 0 0 24px; }
.article h2 { font-size: 25px; line-height: 1.4; margin: 44px 0 10px; padding-top: 8px; }
.article h3 { font-size: 20px; margin: 30px 0 6px; }
.article p { margin: 10px 0; }
.article ol, .article ul { padding-left: 24px; }
.article li { margin: 7px 0; }
.article li::marker { color: var(--accent); font-weight: 700; }
.article strong { font-weight: 600; }
.article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 16px; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.article th, .article td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.article th { background: var(--bg); font-weight: 600; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; margin: 0 0 8px; font-size: 16px; }
.toc b { display: block; font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 3px 0; }

.shots { display: flex; flex-wrap: wrap; gap: 20px; margin: 20px 0 24px; }
.shot { margin: 0; width: 250px; }
.shots.one .shot { width: 290px; }
.shot.wide { width: 100%; max-width: 420px; }
.shot img { border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.shot figcaption { font-size: 14px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.5; }

.note { border-radius: 14px; padding: 14px 18px; margin: 18px 0; background: var(--accent-soft); }
.note p { margin: 4px 0; }
.note.tip { background: var(--ok-soft); }
.note.tip strong:first-child { color: var(--ok); }
.note.warn { background: var(--warn-soft); }
.note.warn strong:first-child { color: var(--warn); }

.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 56px; }
.pager a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; text-decoration: none; color: var(--ink); }
.pager a:hover { border-color: #CFC9F4; }
.pager small { display: block; color: var(--muted); font-size: 14px; }
.pager .next { text-align: right; grid-column: 2; }
.help-box { margin-top: 28px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; font-size: 16px; color: var(--muted); }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 40px 0; font-size: 15px; color: var(--muted); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* Cookie bar (built by consent.js) */
.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; max-width: 760px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 40px rgba(26, 28, 33, 0.18); padding: 14px 18px; display: flex; gap: 14px; align-items: center; z-index: 40; font-size: 15px; line-height: 1.55; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; flex: 1; }
.cookie-actions { display: flex; gap: 8px; flex: none; }
.cookie button { font: inherit; font-weight: 600; border-radius: 999px; padding: 8px 16px; cursor: pointer; border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.cookie button.ghost { background: #fff; color: var(--accent); }

@media (max-width: 980px) {
  .hero .container { grid-template-columns: minmax(0, 1fr); padding-top: 44px; }
  .devices .phone { right: 0; }
  .hero h1 { font-size: 40px; }
  .devices { max-width: 620px; }
  .features, .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-top: 20px; }
  .guide-nav { display: none; }
  .guide-nav-mobile { display: block; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2px 12px; font-size: 15px; }
  .guide-nav-mobile summary { cursor: pointer; font-weight: 600; padding: 10px 4px; }
  .guide-nav-mobile ol { list-style: none; margin: 0; padding: 0 0 8px; }
  .guide-nav-mobile a { display: block; padding: 7px 8px; border-radius: 10px; color: var(--ink); text-decoration: none; line-height: 1.45; }
  .guide-nav-mobile a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .container { height: 60px; gap: 8px; }
  .site-nav a { padding: 8px 8px; font-size: 15px; }
  .site-nav .hide-sm { display: none; }
  .hero h1 { font-size: 32px; }
  .hero .lead { font-size: 17px; }
  .section { padding: 56px 0; }
  .section-head h2, .split h2 { font-size: 27px; }
  .pillars, .features, .topics { grid-template-columns: minmax(0, 1fr); }
  .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .guide-hero h1, .article h1 { font-size: 29px; }
  .shot, .shots.one .shot { width: calc(50% - 10px); }
  .shots.one .shot { width: 78%; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { grid-column: 1; }
  .cookie { flex-direction: column; align-items: stretch; }
  .cookie-actions button { flex: 1; }
  .cta h2 { font-size: 27px; }
}
