/* Public site styles, shared by every page (the homepage adds home.css).
 *
 * Deliberately NOT board.css: the board is an app surface tuned for a LINE
 * webview, this is a document read cold by someone who arrived from search.
 *
 * Every colour is a --nong-* token from tokens.css (brand/tokens/ui.css,
 * vendored by scripts/sync-landing-art.py; <body data-nong="wan"> picks
 * น้องวัน's set). No hex is typed here: to change a colour, edit
 * brand/tokens/cast.json and rerun the sync. Type follows brand/UI.md:
 * Kanit for display, IBM Plex Sans Thai Looped for consumer body text.
 */
:root {
  --measure: 68ch;
  --hairline: color-mix(in srgb, var(--nong-ink) 14%, transparent);
  --display: 'Kanit', 'IBM Plex Sans Thai Looped', system-ui, sans-serif;
  --body: 'IBM Plex Sans Thai Looped', 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--nong-paper);
  color: var(--nong-ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  background: var(--nong-card);
  color: var(--nong-ink);
  border: 2.5px solid var(--nong-ink);
  border-radius: 12px;
  padding: 8px 16px;
  z-index: 10;
}

:focus-visible {
  outline: 3px solid var(--nong-accent);
  outline-offset: 3px;
}

/* ---------- document pages: header band, measure, footer ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 24px;
  background: var(--nong-deep);
  color: var(--nong-paper);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  color: inherit;
  text-decoration: none;
}
.brand img {
  border-radius: 50%;
  background: var(--nong-paper);
}

.site-head nav a {
  color: var(--nong-paper);
  opacity: 0.88;
  margin-left: 16px;
  text-decoration: none;
  font-size: 0.9375rem;
}
.site-head nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 32px 24px 64px;
}

h1,
h2 {
  font-family: var(--display);
  letter-spacing: -0.01em;
}

h1 {
  font-weight: 800;
  font-size: 1.875rem;
  line-height: 1.5;
  margin: 0 0 20px;
}

h2 {
  font-weight: 600;
  font-size: 1.3125rem;
  line-height: 1.6;
  margin: 40px 0 12px;
}

h3 {
  font-size: 1.0625rem;
  margin: 24px 0 6px;
}

p {
  margin: 0 0 16px;
}

.lede {
  font-size: 1.125rem;
  color: var(--nong-ink-soft);
}

a {
  color: var(--nong-accent);
}

ul,
ol {
  padding-left: 1.4em;
  margin: 0 0 16px;
}

li {
  margin-bottom: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline);
}

th[scope='row'] {
  width: 38%;
  font-weight: 600;
  color: var(--nong-ink);
}

.worked,
.mechanics {
  background: var(--nong-card);
  border: 2px solid var(--hairline);
  border-radius: 20px;
  padding: 4px 20px 20px;
  margin: 32px 0;
  overflow-x: auto;
}

.worked .premise,
.faq p {
  color: var(--nong-ink-soft);
}

.worked .result {
  font-weight: 600;
  margin-top: 16px;
}

.src {
  font-size: 0.8125rem;
  color: var(--nong-ink-soft);
}

.faq-item {
  border-top: 1px solid var(--hairline);
  padding-top: 8px;
}

.cta {
  margin: 48px 0 0;
  padding: 24px;
  border-radius: 20px;
  background: var(--nong-soft);
  border: 2.5px solid var(--nong-ink);
  box-shadow: 0 6px 0 color-mix(in srgb, var(--nong-cloak) 30%, var(--nong-ink));
}

/* Sticker button: deep fill, paper text, ink border, presses down 3px. */
.cta-button {
  display: inline-block;
  background: var(--nong-deep);
  color: var(--nong-paper);
  font-weight: 600;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 999px;
  border: 2.5px solid var(--nong-ink);
  box-shadow: 0 4px 0 var(--nong-ink);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.cta-button:hover {
  transform: translateY(-1px);
}
.cta-button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--nong-ink);
}

.related {
  margin-top: 40px;
  border-top: 1px solid var(--hairline);
}

.site-foot {
  border-top: 1px solid var(--hairline);
  background: var(--nong-card);
  padding: 24px;
  text-align: center;
  color: var(--nong-ink-soft);
  font-size: 0.9375rem;
}

.site-foot .fine {
  font-size: 0.8125rem;
  margin: 0;
}

@media (max-width: 600px) {
  main {
    padding: 24px 18px 48px;
  }
  h1 {
    font-size: 1.5rem;
  }
  th[scope='row'] {
    width: 45%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cta-button {
    transition: none;
  }
}
