@font-face {
  font-family: Anuphan;
  src: url("fonts/anuphan-thai-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: Anuphan;
  src: url("fonts/anuphan-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Brand colours come from assets/plugin-icon.svg in the plugin repo: #11B5A4 to #2459E0. */
:root {
  color-scheme: dark;
  --bg: #0b1117;
  --text: #eef4f7;
  --muted: #9fb1bd;
  --line: rgb(255 255 255 / 9%);
  --card: rgb(255 255 255 / 4.5%);
  --card-hover: rgb(255 255 255 / 7%);
  --card-edge: rgb(255 255 255 / 12%);
  --bar: rgb(11 17 23 / 70%);
  --accent: #5fd6c8;
  --accent-soft: rgb(17 181 164 / 18%);
  --danger-soft: rgb(255 128 128 / 14%);
  --danger: #ff9f9f;
  --todo: #f5c56b;
  --todo-soft: rgb(245 197 107 / 10%);
  --aura-strength: 24%;
  --teal: #11b5a4;
  --sky: #1e8fd6;
  --blue: #2459e0;
  --aqua: #2fd1d9;
  --indigo: #4b6bff;
  --brand-line: linear-gradient(90deg, var(--teal), var(--sky) 52%, var(--blue));
  --screen-bg: #0e1720;
  --screen-text: #f1f7fa;
  --screen-muted: #a9bcc8;
  --leading: 1.7;
  --gutter: 16px;
  --radius-l: 24px;
  --radius-m: 18px;
  --radius-pill: 999px;
  --dur-hover: 180ms;
  --dur-switch: 260ms;
  --dur-aura: 900ms;
  --dur-enter: 760ms;
  --dur-ring: 4800ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: linear(0, 0.114 5.2%, 0.218 7.8%, 0.488 13.5%, 0.709 18.8%, 0.865 23.8%, 0.975 29.2%, 1.027 34.2%, 1.05 42.2%, 1.044 47.5%, 1.012 62%, 0.998 81.5%, 1);
  --lift: -2px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f7fa;
    --text: #0f1e29;
    --muted: #4b5d6a;
    --line: rgb(15 30 41 / 10%);
    --card: rgb(255 255 255 / 70%);
    --card-hover: rgb(255 255 255 / 92%);
    --card-edge: rgb(15 30 41 / 9%);
    --bar: rgb(243 247 250 / 76%);
    --accent: #1b52cc;
    --accent-soft: rgb(36 89 224 / 10%);
    --danger-soft: rgb(200 40 40 / 9%);
    --danger: #b42323;
    --todo: #8a5a00;
    --todo-soft: rgb(214 150 20 / 10%);
    --aura-strength: 18%;
  }
}

@property --scroll-thumb-alpha { syntax: "<percentage>"; inherits: false; initial-value: 55%; }

html, body { --scroll-thumb-alpha: 55%; transition: --scroll-thumb-alpha 220ms ease; }
html.is-scrolling, html.is-scrolling body { --scroll-thumb-alpha: 100%; }
::-webkit-scrollbar { width: 12px; height: 12px; background: var(--bg); }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  --scroll-thumb-alpha: inherit;
  min-height: 56px;
  border: 3.5px solid transparent;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg,
    color-mix(in oklab, var(--teal) var(--scroll-thumb-alpha), var(--bg)),
    color-mix(in oklab, var(--sky) var(--scroll-thumb-alpha), var(--bg)) 52%,
    color-mix(in oklab, var(--blue) var(--scroll-thumb-alpha), var(--bg))) padding-box;
}
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { --scroll-thumb-alpha: 100%; border-width: 2.5px; }
::-webkit-scrollbar-corner { background: var(--bg); }
@supports not selector(::-webkit-scrollbar) {
  html { scrollbar-width: thin; scrollbar-color: var(--sky) var(--bg); }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
html[data-lang="th"] { --leading: 1.85; }
html[data-lang="en"] body [lang="th"],
html[data-lang="th"] body [lang="en"] { display: none; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/var(--leading) Anuphan, "Segoe UI", "Noto Sans Thai", system-ui, sans-serif;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
code { font: 500 0.92em ui-monospace, "Cascadia Code", Consolas, monospace; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.aura { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.aura i { position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur-aura) ease; background:
  radial-gradient(52vw 74vh at -6% 42%, color-mix(in oklab, var(--a) var(--aura-strength), transparent), transparent 72%),
  radial-gradient(52vw 74vh at 106% 62%, color-mix(in oklab, var(--b) var(--aura-strength), transparent), transparent 72%); }
.aura i:nth-child(1) { --a: var(--teal); --b: var(--blue); }
.aura i:nth-child(2) { --a: var(--sky); --b: var(--teal); }
.aura i:nth-child(3) { --a: var(--blue); --b: var(--aqua); }
.aura i:nth-child(4) { --a: var(--indigo); --b: var(--sky); }
.aura i:nth-child(5) { --a: var(--aqua); --b: var(--indigo); }
.aura[data-active="0"] i:nth-child(1), .aura:not([data-active]) i:nth-child(1),
.aura[data-active="1"] i:nth-child(2), .aura[data-active="2"] i:nth-child(3),
.aura[data-active="3"] i:nth-child(4), .aura[data-active="4"] i:nth-child(5) { opacity: 1; }

.bar { position: sticky; top: 0; z-index: 10; background: var(--bar); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--line); }
.bar-inner { max-width: 1120px; margin: 0 auto; padding: 10px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.brand img { border-radius: 8px; }
.seek { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand-line); transform: scaleX(0); transform-origin: left; }

.lang-switch { display: none; position: relative; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: var(--radius-pill); background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
html[data-lang] .lang-switch { display: grid; }
.lang-switch button { position: relative; min-width: 52px; min-height: 32px; padding: 0 12px; border: 0; background: none; color: var(--muted); font: 500 14px/1 inherit; font-family: inherit; border-radius: var(--radius-pill); cursor: pointer; transition: color var(--dur-hover) ease; }
.lang-switch button[aria-pressed="true"] { color: var(--text); }
.lang-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: var(--radius-pill); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--card-edge); transition: transform var(--dur-switch) var(--spring); }
html[data-lang="th"] .lang-thumb { transform: translateX(100%); }

.hero { overflow-x: clip; overflow-y: visible; }
.hero-inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 56px var(--gutter) 40px; }
.hero-glow { position: absolute; inset: 40px -6% 0; border-radius: 50%; background: conic-gradient(from 210deg, var(--teal), var(--sky), var(--blue), var(--indigo), var(--aqua), var(--teal)); filter: blur(72px) saturate(1.2); opacity: 0.55; }
.screen { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(28px, 5vw, 60px); border-radius: var(--radius-l); background: var(--screen-bg); color: var(--screen-text); box-shadow: 0 0 0 1px rgb(255 255 255 / 12%), 0 30px 60px -30px rgb(0 0 0 / 60%); }
.screen > :not(.screen-ring) { position: relative; }
.eyebrow { font-size: 15px; font-weight: 500; background: linear-gradient(90deg, #5fe0d2, #6fb6ff); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
h1 { margin-top: 6px; font-size: clamp(38px, 6.4vw, 68px); font-weight: 650; line-height: 1.16; letter-spacing: -0.02em; }
html[data-lang="th"] h1 { letter-spacing: -0.005em; line-height: 1.32; }
.date, .compat { margin-top: 8px; color: var(--screen-muted); font-size: 15px; }
.kicker { margin-top: clamp(30px, 5vw, 52px); color: var(--screen-muted); font-size: 15px; font-weight: 500; }
.statement { margin-top: 4px; max-width: 24em; font-size: clamp(23px, 3.2vw, 32px); font-weight: 500; line-height: 1.34; letter-spacing: -0.01em; }
.screen h1 + .statement { margin-top: 14px; font-size: clamp(20px, 2.6vw, 26px); color: rgb(241 247 250 / 92%); }
html[data-lang="th"] .statement { line-height: 1.5; letter-spacing: 0; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.facts li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; border-radius: var(--radius-pill); background: rgb(255 255 255 / 6%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); font-size: 15px; line-height: 1.35; }
.facts .ico { width: 18px; height: 18px; color: var(--screen-muted); }

/* Decorative ring of actions in the hero, drawn after the plugin icon. */
.screen-ring { display: none; position: absolute; top: 50%; width: clamp(260px, 30vw, 340px); height: auto; transform: translateY(-50%); pointer-events: none; }
.screen-ring .ring-dot { fill: url(#brand); }
.screen-ring .ring-window { fill: none; stroke: #ffffff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.screen-ring .ring-fill { fill: #ffffff; opacity: 0.85; }
@media (min-width: 1080px) {
  .screen-ring { display: block; right: clamp(24px, 4vw, 64px); }
  .screen.has-ring > :not(.screen-ring) { max-width: calc(100% - 360px); }
}

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: var(--radius-pill); font-size: 16px; font-weight: 500; text-decoration: none; transition: transform var(--dur-hover) var(--ease-out), background-color var(--dur-hover) ease; }
.button.primary { background: linear-gradient(120deg, #0f9e90, #2459e0); color: #ffffff; box-shadow: 0 10px 28px -12px rgb(36 89 224 / 80%); }
.button.primary[aria-disabled="true"] { cursor: default; }
.button.ghost { color: var(--screen-text); box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / 22%); }
.button .soon { padding: 2px 9px; border-radius: var(--radius-pill); background: rgb(255 255 255 / 18%); font-size: 13px; }
@media (hover: hover) { .button.ghost:hover { background: rgb(255 255 255 / 7%); transform: translateY(var(--lift)); } }

.layout { max-width: 1120px; margin: 0 auto; padding: 8px var(--gutter) 40px; display: grid; grid-template-columns: minmax(0, 1fr); }
.toc { display: none; }
main { min-width: 0; max-width: 760px; width: 100%; margin: 0 auto; }
.block { padding-block: 34px; }
.block > h2 { font-size: clamp(25px, 3vw, 31px); font-weight: 600; line-height: 1.3; letter-spacing: -0.012em; margin-bottom: 18px; }
html[data-lang="th"] .block > h2 { line-height: 1.5; letter-spacing: 0; }
.block > p + p { margin-top: 12px; }
.block p + .demo, .block p + .never, .block p + .scope, .block .scope + p, .block p + .note, .block .steps + .note, .block .cards + p { margin-top: 22px; }

.cards { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.card { padding: 22px; border-radius: var(--radius-m); background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); transition: background-color var(--dur-hover) ease, transform var(--dur-hover) var(--ease-out); }
@media (hover: hover) { .card:hover { background: var(--card-hover); transform: translateY(var(--lift)); } }
.card h2, .card h3 { margin: 14px 0 4px; font-size: 19px; font-weight: 600; line-height: 1.4; }
.card p { color: var(--muted); font-size: 16px; }
.tile { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }

.todo { padding: 18px 20px; border-radius: var(--radius-m); border: 1.5px dashed var(--todo); background: var(--todo-soft); }
.todo-tag { display: inline-block; margin-bottom: 6px; padding: 1px 10px; border-radius: var(--radius-pill); background: var(--todo); color: var(--bg); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.todo p { color: var(--muted); font-size: 16px; }

.steps { display: grid; gap: 12px; counter-reset: step; }
.steps li { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: var(--radius-m); background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); counter-increment: step; }
.steps li::before { content: counter(step); flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-line); color: #ffffff; font-weight: 600; font-size: 15px; line-height: 1; }
.steps li > span { padding-top: 2px; }
.note { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 15.5px; }
.note .ico { margin-top: 4px; color: var(--accent); }

.demo { margin: 22px 0 0; padding: 18px; border-radius: var(--radius-m); border: 1.5px dashed var(--card-edge); background: var(--card); }
.demo-bound { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 15px; font-weight: 500; }
.demo-steps { margin-top: 18px; display: grid; gap: 10px; justify-items: center; grid-template-columns: minmax(0, 1fr); }
.demo-step { width: 100%; max-width: 220px; text-align: center; }
.demo-step p { margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.demo-view { display: grid; place-items: center; height: 92px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.demo-view .ico { width: 40px; height: 40px; stroke-width: 1.5; }
.demo-arrow { width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }
.demo-note { margin-top: 14px; font-size: 14.5px; color: var(--muted); text-align: center; }

.scope { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.scope > div { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: var(--radius-m); background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.scope-label { color: var(--muted); font-size: 14.5px; }
.scope code, .scope strong { font-size: 16px; color: var(--accent); overflow-wrap: anywhere; font-weight: 500; }
.never { padding: 20px 22px; border-radius: var(--radius-m); background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); }
.never h3 { font-size: 17px; font-weight: 600; line-height: 1.4; }
.never ul { margin-top: 12px; display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.never li { display: flex; align-items: center; gap: 10px; line-height: 1.4; font-size: 16px; }
.never .ico { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--danger-soft); color: var(--danger); stroke-width: 2.2; }

/* Licence text: numbered sections in plain language. */
.legal { counter-reset: clause; }
.clause { padding-block: 26px; border-top: 1px solid var(--line); }
.clause:first-child { border-top: 0; }
.clause > h2 { display: flex; align-items: baseline; gap: 12px; font-size: clamp(21px, 2.6vw, 25px); font-weight: 600; line-height: 1.35; margin-bottom: 10px; counter-increment: clause; }
html[data-lang="th"] .clause > h2 { line-height: 1.55; }
.clause > h2::before { content: counter(clause); flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 600; transform: translateY(-2px); }
.clause p + p, .clause p + ul, .clause ul + p, .clause .todo + p, .clause p + .todo { margin-top: 12px; }
.clause ul { display: grid; gap: 8px; }
.clause ul li { position: relative; padding-left: 22px; }
.clause ul li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-line); }
.clause .muted { color: var(--muted); }
.clause a { color: var(--accent); text-underline-offset: 3px; }

.disclaimer { margin-top: 18px; padding: 16px 20px; border-radius: var(--radius-m); background: var(--card); box-shadow: inset 0 0 0 1px var(--card-edge); color: var(--muted); font-size: 15.5px; }

.contact { text-align: center; }
.contact h2 { margin-bottom: 14px !important; }
.contact p { color: var(--muted); }
.contact p + .mail { margin-top: 16px; }
.mail { position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: var(--radius-pill); font-size: clamp(16px, 2.4vw, 19px); font-weight: 500; text-decoration: none; background: var(--bg); box-shadow: inset 0 0 0 1.5px transparent; transition: transform var(--dur-hover) var(--ease-out); overflow-wrap: anywhere; }
.mail::before { content: ""; position: absolute; inset: 0; z-index: -1; padding: 1.5px; border-radius: inherit; background: var(--brand-line); -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.mail::after { content: ""; position: absolute; inset: 4px 14px -6px; z-index: -2; border-radius: inherit; background: var(--brand-line); filter: blur(16px); opacity: 0.4; transition: opacity var(--dur-hover) ease; }
@media (hover: hover) { .mail:hover { transform: translateY(var(--lift)); } .mail:hover::after { opacity: 0.75; } }
.mail:active { transform: scale(0.98); }

.foot { max-width: 1120px; margin: 0 auto; padding: 22px var(--gutter) 44px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 12px; font-size: 15px; }
.foot-links a { text-decoration: none; color: var(--text); }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot p + p { margin-top: 4px; }
.foot .fine { font-size: 13px; }

.lost { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 40px var(--gutter); text-align: center; }
.lost h1 { font-size: clamp(34px, 6vw, 56px); }
.lost p { margin-top: 10px; color: var(--muted); }
.lost .button { margin-top: 24px; }
.lost .button.primary { color: #ffffff; }

@media (min-width: 640px) {
  .cards.two, .scope { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-steps { grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 22px minmax(0, 1fr); align-items: start; }
  .demo-arrow { transform: none; margin-top: 35px; }
}
@media (min-width: 760px) { .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
  .layout { grid-template-columns: 196px minmax(0, 1fr); gap: 48px; }
  main { margin: 0; }
  .toc { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 92px; align-self: start; padding-top: 34px; }
  .toc-title { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
  .toc a { position: relative; padding: 5px 0 5px 14px; color: var(--muted); font-size: 15px; line-height: 1.45; text-decoration: none; transition: color var(--dur-hover) ease; }
  .toc a::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: var(--brand-line); transform: scaleY(0); transition: transform var(--dur-switch) var(--ease-out); }
  .toc a:hover, .toc a[aria-current="true"] { color: var(--text); }
  .toc a[aria-current="true"]::before { transform: scaleY(1); }
}

@media (prefers-reduced-motion: no-preference) {
  .screen { animation: screen-in var(--dur-enter) var(--ease-out) backwards; }
  .hero-glow { animation: glow-bloom 1400ms var(--ease-out) backwards, glow-drift 26s linear infinite; }
  @keyframes screen-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } }
  @keyframes glow-bloom { from { opacity: 0; } }
  @keyframes glow-drift { to { transform: rotate(360deg); } }

  /* One dot of the ring lights up at a time, like moving around the Actions Ring. */
  .screen-ring .ring-dot { animation: ring-pick var(--dur-ring) var(--ease-out) infinite; animation-delay: calc(var(--dot) * var(--dur-ring) / 8); transform-box: fill-box; transform-origin: center; }
  @keyframes ring-pick { 0%, 100% { opacity: 0.5; transform: scale(1); } 6% { opacity: 1; transform: scale(1.22); } 16% { opacity: 0.5; transform: scale(1); } }

  @supports (animation-timeline: scroll()) {
    .seek { animation: seek-fill linear both; animation-timeline: scroll(root); }
    @keyframes seek-fill { to { transform: scaleX(1); } }
    .reveal { animation: reveal-rise linear backwards; animation-timeline: view(); animation-range: entry 0% entry 26%; }
    @keyframes reveal-rise { from { opacity: 0; transform: translateY(18px); } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; }
}

/* Every-action list on the home page: two columns inside each group card, one on phones. */
.action-list { margin: 12px 0 0; padding-left: 18px; columns: 2; column-gap: 24px; }
.action-list li { margin: 4px 0; break-inside: avoid; }
.action-list.long { columns: 1; }
@media (max-width: 640px) { .action-list { columns: 1; } }
