/* Teatorn Help Center. Colors and radii come from /tokens.css. */
:root {
  --ink:var(--teatorn-color-ink,#171717); --muted:var(--teatorn-color-muted,#626267); --blue:var(--teatorn-color-primary,#365add);
  --blue-hover:var(--teatorn-color-primary-hover,#2847bd); --accent:var(--teatorn-color-accent,#7136ff); --line:var(--teatorn-color-line,#e7e6ee);
  --soft:var(--teatorn-color-soft,#f0ecff); --surface:#fff; --canvas:#fbfbfd; --side:#f7f7f9;
  --header:64px;
}
* { box-sizing:border-box; }
html { scroll-padding-top:calc(var(--header) + 16px); -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--surface); color:var(--ink); font:15px/1.65 var(--teatorn-font-family,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif); }
a { color:var(--blue); text-underline-offset:3px; }
a:hover { color:var(--blue-hover); }
.icon { width:16px; height:16px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip { position:absolute; left:12px; top:-60px; z-index:100; padding:10px 14px; border-radius:10px; background:var(--ink); color:#fff; }
.skip:focus { top:12px; }
:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
kbd { display:inline-block; min-width:22px; padding:1px 6px; border:1px solid var(--line); border-bottom-width:2px; border-radius:6px; background:#fff; font:600 12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace; text-align:center; color:var(--muted); }

/* Header */
.docs-header { position:sticky; top:0; z-index:50; height:var(--header); border-bottom:1px solid var(--line); background:rgb(255 255 255 / 92%); backdrop-filter:saturate(1.4) blur(10px); }
.docs-header-inner { display:flex; align-items:center; gap:20px; height:100%; max-width:1440px; margin:0 auto; padding:0 24px; }
.docs-brand { display:flex; align-items:center; gap:8px; color:var(--ink); font-weight:700; font-size:17px; text-decoration:none; letter-spacing:-.02em; }
.docs-badge { padding:2px 8px; border-radius:999px; background:var(--soft); color:var(--accent); font-size:12px; font-weight:650; letter-spacing:0; }
.docs-menu { display:none; width:40px; height:40px; padding:0; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); }
.docs-menu .icon { width:18px; height:18px; margin:auto; }
.docs-search { position:relative; flex:1; max-width:520px; margin:0 auto; }
.docs-search label { display:flex; align-items:center; gap:8px; height:40px; padding:0 10px 0 12px; border:1px solid var(--line); border-radius:10px; background:var(--canvas); color:var(--muted); }
.docs-search label:focus-within { border-color:var(--blue); background:#fff; box-shadow:0 0 0 3px rgb(54 90 221 / 14%); }
.docs-search input { flex:1; min-width:0; border:0; outline:0; background:transparent; color:var(--ink); font:inherit; font-size:14px; }
.docs-results { position:absolute; top:calc(100% + 6px); left:0; right:0; max-height:420px; overflow:auto; margin:0; padding:6px; list-style:none; border:1px solid var(--line); border-radius:12px; background:#fff; box-shadow:0 18px 48px rgb(16 24 40 / 16%); }
.docs-results a { display:grid; gap:2px; padding:9px 10px; border-radius:8px; color:var(--ink); text-decoration:none; }
.docs-results a span { color:var(--muted); font-size:12px; }
.docs-results a small { color:var(--muted); font-size:12.5px; line-height:1.45; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.docs-results a mark { background:#fff1b3; color:inherit; border-radius:3px; }
.docs-results [aria-selected="true"] a,.docs-results a:hover { background:var(--soft); }
.docs-results .empty { padding:12px; color:var(--muted); font-size:13.5px; }
.docs-links { display:flex; align-items:center; gap:2px; margin-left:auto; font-size:14.5px; }
.docs-links > a:not(.docs-cta) { padding:8px 11px; border-radius:8px; color:var(--muted); text-decoration:none; font-weight:550; white-space:nowrap; }
.docs-links > a:not(.docs-cta):hover { background:var(--canvas); color:var(--ink); }
.docs-links .docs-cta { margin-left:8px; }
.docs-links .docs-cta { display:inline-flex; align-items:center; gap:6px; padding:8px 14px; border-radius:10px; background:var(--blue); color:#fff; font-weight:600; }
.docs-links .docs-cta:hover { background:var(--blue-hover); color:#fff; }
.docs-links .docs-cta .icon { width:14px; height:14px; }

/* Layout */
.docs-shell { display:grid; grid-template-columns:268px minmax(0,1fr) 220px; max-width:1440px; margin:0 auto; }
.docs-shell.no-toc { grid-template-columns:268px minmax(0,1fr); }
.docs-sidebar { position:sticky; top:var(--header); height:calc(100vh - var(--header)); overflow:auto; padding:20px 16px 40px; border-right:1px solid var(--line); background:var(--side); }
.docs-filter { display:flex; align-items:center; gap:8px; height:36px; margin-bottom:16px; padding:0 10px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--muted); }
.docs-filter input { flex:1; min-width:0; border:0; outline:0; background:transparent; font:inherit; font-size:13.5px; color:var(--ink); }
.docs-nav-group { margin-bottom:18px; }
.docs-nav-group[hidden] { display:none; }
.docs-nav-title { display:flex; align-items:center; gap:8px; margin:0 0 6px; padding:0 8px; color:var(--ink); font-size:13px; font-weight:650; }
.docs-nav-title .icon { color:var(--accent); }
.docs-nav-group ul { list-style:none; margin:0; padding:0 0 0 15px; border-left:1px solid var(--line); margin-left:15px; }
.docs-nav-group li[hidden] { display:none; }
.docs-nav-group a { display:block; padding:5px 10px; border-radius:7px; color:var(--muted); font-size:13.5px; text-decoration:none; line-height:1.45; }
.docs-nav-group a:hover { color:var(--ink); background:#ececf0; }
.docs-nav-group a[aria-current="page"] { color:var(--blue); background:#e9eefd; font-weight:600; }
.docs-main { min-width:0; padding:36px 56px 72px; }

/* Article */
.doc { max-width:780px; margin:0 auto; }
.crumbs { display:flex; align-items:center; gap:6px; margin-bottom:12px; color:var(--muted); font-size:13px; }
.crumbs a { color:var(--muted); text-decoration:none; }
.crumbs a:hover { color:var(--ink); }
.crumbs .icon { width:13px; height:13px; }
.doc-title { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.doc h1 { margin:0; font-size:34px; line-height:1.15; letter-spacing:-.03em; }
.doc-copy { display:inline-flex; align-items:center; gap:6px; flex:none; margin-top:6px; padding:6px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--muted); font:500 13px/1.4 inherit; cursor:pointer; }
.doc-copy:hover { color:var(--ink); border-color:#cfd0da; }
.doc-lead { margin:12px 0 24px; padding-bottom:24px; border-bottom:1px solid var(--line); color:var(--muted); font-size:17px; line-height:1.6; }
.doc-body h2 { margin:40px 0 12px; font-size:21px; letter-spacing:-.02em; scroll-margin-top:calc(var(--header) + 16px); }
.doc-body h2:first-child { margin-top:0; }
.doc-body p,.doc-body li { color:#2b2b31; }
.doc-body ul,.doc-body ol { padding-left:22px; }
.doc-body li { margin:6px 0; }
.doc-shot { margin:24px 0; border:1px solid var(--line); border-radius:14px; overflow:hidden; background:var(--canvas); box-shadow:0 10px 30px rgb(16 24 40 / 8%); }
.doc-shot img { display:block; width:100%; height:auto; }
.doc-shot figcaption { padding:10px 14px; border-top:1px solid var(--line); background:#fff; color:var(--muted); font-size:13px; }
.steps { counter-reset:step; list-style:none; padding:0 !important; }
.steps li { position:relative; margin:0; padding:2px 0 16px 44px; }
.steps li::before { counter-increment:step; content:counter(step); position:absolute; left:0; top:0; display:grid; place-items:center; width:28px; height:28px; border-radius:999px; background:var(--soft); color:var(--accent); font-weight:700; font-size:13px; }
.steps li::after { content:""; position:absolute; left:13.5px; top:32px; bottom:4px; width:1px; background:var(--line); }
.steps li:last-child::after { display:none; }
.callout { display:flex; gap:12px; margin:20px 0; padding:14px 16px; border-radius:12px; font-size:14.5px; }
.callout p { margin:0; }
.callout .callout-icon { width:18px; height:18px; margin-top:3px; }
.callout-note { background:#eef3ff; color:#1f3a8f; }
.callout-tip { background:#f1ecff; color:#4b25b3; }
.callout-warn { background:#fff5e6; color:#7a4f10; }
.callout a { color:inherit; font-weight:600; }
.table-scroll { margin:18px 0; overflow-x:auto; border:1px solid var(--line); border-radius:12px; }
.doc-body table { width:100%; border-collapse:collapse; font-size:14px; }
.doc-body th { padding:10px 14px; background:var(--canvas); border-bottom:1px solid var(--line); color:var(--muted); font-size:12.5px; font-weight:650; text-align:left; white-space:nowrap; }
.doc-body td { padding:10px 14px; border-bottom:1px solid var(--line); vertical-align:top; }
.doc-body tr:last-child td { border-bottom:0; }
.doc-body table.glossary td:first-child { white-space:nowrap; }
.feature-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; list-style:none; padding:0 !important; }
.feature-grid li { display:grid; gap:4px; margin:0; padding:14px 16px; border:1px solid var(--line); border-radius:12px; }
.feature-grid span { color:var(--muted); font-size:14px; line-height:1.55; }
.releases { list-style:none; padding:0 !important; margin:0; }
.releases li { display:grid; grid-template-columns:150px minmax(0,1fr); gap:16px; margin:0; padding:16px 0; border-bottom:1px solid var(--line); }
.releases time { color:var(--muted); font-size:13px; padding-top:2px; }
.releases p { margin:4px 0 0; color:var(--muted); font-size:14px; }
.docs-pager { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:48px; }
.docs-pager a { display:grid; gap:4px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; color:var(--ink); text-decoration:none; }
.docs-pager a:hover { border-color:var(--blue); }
.docs-pager span { display:inline-flex; align-items:center; gap:4px; color:var(--muted); font-size:13px; }
.docs-pager .next { text-align:right; justify-items:end; }

/* On this page */
.docs-toc { position:sticky; top:var(--header); height:calc(100vh - var(--header)); overflow:auto; padding:36px 20px 40px 8px; font-size:13px; }
.docs-toc p { margin:0 0 8px; color:var(--ink); font-weight:650; }
.docs-toc ul { list-style:none; margin:0 0 20px; padding:0; border-left:1px solid var(--line); }
.docs-toc a { display:block; margin-left:-1px; padding:4px 0 4px 12px; border-left:2px solid transparent; color:var(--muted); text-decoration:none; line-height:1.45; }
.docs-toc a:hover { color:var(--ink); }
.docs-toc a.is-active { border-color:var(--blue); color:var(--blue); font-weight:600; }
.docs-toc .docs-toc-app { display:inline-flex; align-items:center; gap:6px; padding:0; border:0; color:var(--muted); }

/* Home */
.docs-hero { max-width:860px; margin:12px auto 36px; text-align:center; }
.docs-kicker { margin:0 0 10px; color:var(--accent); font-size:13px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.docs-hero h1 { margin:0; font-size:42px; line-height:1.12; letter-spacing:-.035em; }
.docs-hero p { margin:14px auto 0; max-width:640px; color:var(--muted); font-size:17px; }
.docs-hero-actions { display:flex; justify-content:center; gap:10px; margin-top:24px; }
.docs-button,.docs-button-quiet { display:inline-flex; align-items:center; gap:8px; padding:11px 18px; border-radius:10px; font-weight:600; text-decoration:none; }
.docs-button { background:var(--blue); color:#fff; }
.docs-button:hover { background:var(--blue-hover); color:#fff; }
.docs-button-quiet { border:1px solid var(--line); color:var(--ink); }
.docs-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:16px; max-width:1080px; margin:0 auto; }
.docs-card { padding:20px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.docs-card-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:12px; background:var(--soft); color:var(--accent); }
.docs-card-icon .icon { width:20px; height:20px; }
.docs-card h2 { margin:14px 0 8px; font-size:17px; }
.docs-card ul { list-style:none; margin:0; padding:0; }
.docs-card a { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 0; border-top:1px solid #f1f1f4; color:var(--ink); font-size:14px; text-decoration:none; }
.docs-card a .icon { width:14px; height:14px; color:var(--muted); }
.docs-card a:hover { color:var(--blue); }
.docs-new { max-width:1080px; margin:40px auto 0; }
.docs-new-head { display:flex; align-items:center; justify-content:space-between; }
.docs-new-head h2 { margin:0; font-size:20px; }
.docs-new-head a { display:inline-flex; align-items:center; gap:4px; font-size:14px; text-decoration:none; }

/* Footer */
.docs-footer { padding:24px; border-top:1px solid var(--line); color:var(--muted); font-size:12.5px; text-align:center; }
.docs-footer div { display:flex; flex-wrap:wrap; justify-content:center; gap:8px 16px; margin-bottom:8px; }
.docs-footer a { color:var(--muted); }

@media (max-width:1180px) {
  .docs-shell { grid-template-columns:240px minmax(0,1fr); }
  .docs-toc { display:none; }
  .docs-main { padding:32px 36px 64px; }
}
@media (max-width:860px) {
  .docs-shell,.docs-shell.no-toc { display:block; }
  .docs-menu { display:grid; }
  .docs-links > a:not(.docs-cta) { display:none; }
  .docs-sidebar { position:fixed; top:var(--header); left:0; bottom:0; z-index:40; width:min(320px,86vw); height:auto; transform:translateX(-100%); transition:transform .2s ease; box-shadow:0 20px 60px rgb(16 24 40 / 20%); }
  body.nav-open .docs-sidebar { transform:none; }
  .docs-main { padding:24px 16px 56px; }
  .doc h1 { font-size:28px; }
  .docs-hero h1 { font-size:30px; }
  .feature-grid,.docs-pager { grid-template-columns:minmax(0,1fr); }
  .releases li { grid-template-columns:minmax(0,1fr); gap:4px; }
}
@media (max-width:560px) {
  .docs-header-inner { gap:10px; padding:0 12px; }
  .docs-brand span:not(.docs-badge) { display:none; }
  .docs-search kbd { display:none; }
  .docs-links .docs-cta { padding:8px 10px; font-size:0; gap:0; }
  .docs-links .docs-cta .icon { width:16px; height:16px; }
  .doc-copy span { display:none; }
}
@media (prefers-reduced-motion:reduce) { .docs-sidebar { transition:none; } }
.docs-links .lang-switch { margin-right:4px; }
:lang(th) .doc h1,:lang(th) .docs-hero h1 { letter-spacing:0; line-height:1.3; }
:lang(th) .doc-body p,:lang(th) .doc-body li { line-height:1.8; }
@media (max-width:860px) { .docs-links .lang-switch { margin-right:0; } }
/* Site menu in the header: text links give way to search on narrower screens. */
.docs-search { min-width:0; }
.docs-search label { min-width:0; }
@media (max-width:1000px) { .docs-links > a:not(.docs-cta) { display:none; } }
@media (max-width:560px) {
  .docs-header-inner { gap:10px; }
  .docs-search kbd { display:none; }
  .docs-links .docs-cta { margin-left:4px; }
  .docs-brand .docs-badge { display:none; }
}
