/* The public page at "/". No inline styles anywhere (the CSP refuses them);
   --accent comes from the brand. The portal's look: the ink of its side
   rail opens the page, the same typeface, and features set as a ruled list
   instead of a wall of cards. */
@font-face {
  font-family: "IBM Plex Sans Thai";
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-thai-thai-400-normal.woff2) format("woff2");
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai";
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-thai-latin-400-normal.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Thai";
  font-weight: 600;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-thai-thai-600-normal.woff2) format("woff2");
  unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "IBM Plex Sans Thai";
  font-weight: 600;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-thai-latin-600-normal.woff2) format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --accent: #2f5bd3;
  --ink: #10263a;
  --ink-raised: #1a3650;
  --on-ink: #e3ecf2;
  --on-ink-muted: #a9bccb;
  --bg: #f3f5f4;
  --surface: #ffffff;
  --text: #16212b;
  --muted: #586571;
  --border: #dfe5e3;
  --accent-strong: color-mix(in srgb, var(--accent) 86%, #000);
  color-scheme: light dark;
}
:root[data-theme="dark"] {
  --ink: #0b1620;
  --ink-raised: #172736;
  --bg: #111920;
  --surface: #18222b;
  --text: #e6ebef;
  --muted: #9eabb6;
  --border: #2a3742;
  --accent-strong: color-mix(in srgb, var(--accent) 62%, #fff);
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #0b1620;
    --ink-raised: #172736;
    --bg: #111920;
    --surface: #18222b;
    --text: #e6ebef;
    --muted: #9eabb6;
    --border: #2a3742;
    --accent-strong: color-mix(in srgb, var(--accent) 62%, #fff);
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
html[data-lang="th"] [lang="en"],
html[data-lang="en"] [lang="th"] {
  display: none;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.65 "IBM Plex Sans Thai",
    system-ui,
    -apple-system,
    "Segoe UI",
    "Leelawadee UI",
    Thonburi,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent-strong);
  text-underline-offset: 0.18em;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.top,
main,
footer {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* The ink runs edge to edge behind the bar and the opening. */
.top,
.hero {
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: 0 0 0 100vmax var(--ink);
  clip-path: inset(0 -100vmax);
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.top a:focus-visible,
.top button:focus-visible,
.hero a:focus-visible {
  outline-color: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
}
.logo {
  height: 28px;
}
.hero {
  /* One pixel under the bar: no seam between the two inks. */
  margin-top: -1px;
  padding: calc(4.5rem + 1px) 0 5rem;
}
h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  max-width: 20em;
  color: #fff;
}
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 4rem 0 1.5rem;
}
h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.lead {
  font-size: 1.15rem;
  color: var(--on-ink-muted);
  margin: 0 0 2rem;
  max-width: 40rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}
.button {
  display: inline-block;
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}
.top .button,
.hero .button:not(.primary) {
  background: transparent;
  border-color: var(--on-ink-muted);
  color: #fff;
}
.top .button:hover,
.hero .button:not(.primary):hover {
  background: var(--ink-raised);
  border-color: #fff;
}
/* The switches in the bar: icons, named for screen readers. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.icon {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--on-ink);
  cursor: pointer;
}
.icon:hover {
  background: var(--ink-raised);
  color: #fff;
}
/* Each theme shows the switch to the other one. */
.to-light {
  display: none;
}
:root[data-theme="dark"] .to-light {
  display: revert;
}
:root[data-theme="dark"] .to-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .to-light {
    display: revert;
  }
  :root:not([data-theme="light"]) .to-dark {
    display: none;
  }
}
.top nav {
  gap: 0.35rem;
}
.top nav .button {
  margin-left: 0.6rem;
}
.link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--on-ink-muted);
  cursor: pointer;
}
.link:hover {
  color: #fff;
}

/* What it does: a ruled list in two columns. */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(24rem, 100%), 1fr));
  column-gap: 3.5rem;
}
.card {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 1.5rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  max-width: 34rem;
}
.dev {
  max-width: 46rem;
  padding-bottom: 4rem;
}
.dev > p {
  color: var(--muted);
}
pre {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 10px;
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  font:
    0.9rem/1.6 ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
}
.plain {
  padding-left: 1.2rem;
  color: var(--muted);
}
.plain li {
  margin-bottom: 0.35rem;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
