/* Typing to Learn — article + legal page layout (privacy, terms, refund, contact, guides).
   Loaded after the shared site.css (head.html). The --ct-* tokens map onto site.css tokens, so light/dark
   and the theme toggle follow the rest of the site; the hex values are fallbacks if site.css is absent.
   No emoji; icons are inline SVG. */

:root {
  --ct-text: var(--ink, #15132e);
  --ct-muted: var(--ink-2, #47446a);
  --ct-faint: var(--ink-3, #636084);
  --ct-surface: var(--surface, #ffffff);
  --ct-surface-2: var(--surface-2, #f6f5fd);
  --ct-border: var(--line, #e4e1f2);
  --ct-accent: var(--primary-ink, #4434d6);
  --ct-accent-strong: var(--primary, #5b4cf0);
  --ct-accent-soft: var(--primary-soft, #ecebff);
  --ct-note-bg: var(--accent-soft, #fff3da);
  --ct-note-border: var(--accent, #f59e0b);
  --ct-note-text: var(--accent-ink, #a35406);
  --ct-warn-bg: var(--danger-soft, #fdeceb);
  --ct-warn-border: var(--danger, #dc2626);
  --ct-warn-text: var(--danger-ink, #b91c1c);
  --ct-code-bg: var(--surface-3, #ecebf8);
  --ct-radius: var(--radius, 14px);
  --ct-measure: 72ch;
  --ct-toc-w: 248px;
  --ct-header-offset: calc(var(--header-h, 64px) + 20px);
  /* finger colours used by the guide figures (same hues as the app) */
  --fg-pinky: #fde2e4;
  --fg-ring: #fff1c9;
  --fg-middle: #d8f5e3;
  --fg-index-l: #dbeafe;
  --fg-index-r: #ede4ff;
  --fg-thumb: #eceff4;
  --fg-key-text: #15132e;
  --fg-key-stroke: #b9b5d3;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fg-pinky: #4a2531;
    --fg-ring: #463b1c;
    --fg-middle: #1b4030;
    --fg-index-l: #1d3352;
    --fg-index-r: #33285a;
    --fg-thumb: #2a2d45;
    --fg-key-text: #eeedff;
    --fg-key-stroke: #45456e;
  }
}
:root[data-theme="dark"] {
  --fg-pinky: #4a2531;
  --fg-ring: #463b1c;
  --fg-middle: #1b4030;
  --fg-index-l: #1d3352;
  --fg-index-r: #33285a;
  --fg-thumb: #2a2d45;
  --fg-key-text: #eeedff;
  --fg-key-stroke: #45456e;
}

/* ---------- page frame ---------- */
.doc {
  color: var(--ct-text);
  padding: 24px 0 72px;
}
.doc-wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.doc :where(h1, h2, h3, h4) {
  color: var(--ct-text);
  line-height: 1.3;
  scroll-margin-top: var(--ct-header-offset);
}
.doc a:where(:not(.btn)) {
  color: var(--ct-accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.doc a:where(:not(.btn)):hover {
  color: var(--ct-accent-strong);
  text-decoration-thickness: 2px;
}
.doc a:focus-visible,
.doc summary:focus-visible,
.doc button:focus-visible {
  outline: 3px solid var(--ct-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.doc-review-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 20px;
  padding: 8px 12px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ct-muted);
  background: var(--ct-surface-2);
  border: 1px dashed var(--ct-border);
  border-radius: 8px;
}
.doc-review-note svg {
  flex: none;
  margin-top: 2px;
}

.doc-crumbs {
  margin: 0 0 20px;
}
.doc-crumbs ol {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 0;
  padding: 5px 12px;
  list-style: none;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--ct-muted);
  background: color-mix(in srgb, var(--ct-surface-2) 75%, transparent);
  border: 1px solid var(--ct-border);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 2px rgba(15, 12, 41, 0.03);
}
.doc-crumbs li {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
.doc-crumbs a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--ct-muted) !important;
  text-decoration: none !important;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.doc-crumbs li:first-child a::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 2px;
  background-color: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: 0.85;
  flex: none;
}
.doc-crumbs a:hover {
  color: var(--ct-accent-strong) !important;
  background: color-mix(in srgb, var(--ct-accent-soft) 80%, transparent);
  text-decoration: none !important;
}
.doc-crumbs a:focus-visible {
  outline: 2px solid var(--ct-accent);
  outline-offset: 1px;
}
.doc-crumbs li + li::before {
  content: '/';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
  color: var(--ct-faint);
  opacity: 0.45;
  font-size: 0.82em;
  font-weight: 300;
  user-select: none;
}
.doc-crumbs [aria-current='page'] {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  color: var(--ct-text) !important;
  font-weight: 600;
  user-select: text;
}
@media (pointer: coarse) {
  .doc-crumbs ol {
    padding: 6px 14px;
  }
  .doc-crumbs a,
  .doc-crumbs [aria-current='page'] {
    padding: 5px 10px;
    min-height: 38px;
  }
}

.doc-head {
  max-width: 820px;
  margin-bottom: 32px;
}
.doc-eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ct-accent);
}
.doc-head h1 {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.8rem);
  letter-spacing: -0.01em;
}
.doc-lede {
  margin: 0 0 16px;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ct-muted);
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  font-size: 0.875rem;
  color: var(--ct-muted);
}
.doc-meta strong {
  color: var(--ct-text);
  font-weight: 600;
}

/* ---------- two-column layout with table of contents ---------- */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}
@media (min-width: 980px) {
  .doc-layout {
    grid-template-columns: var(--ct-toc-w) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }
  .doc-toc {
    position: sticky;
    top: var(--ct-header-offset);
    max-height: calc(100vh - var(--ct-header-offset) - 16px);
    overflow: auto;
  }
}

.doc-toc details {
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface);
  padding: 12px 16px;
}
.doc-toc summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ct-text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.doc-toc summary::-webkit-details-marker {
  display: none;
}
.doc-toc summary svg {
  transition: transform 0.15s ease;
}
.doc-toc details[open] summary svg {
  transform: rotate(180deg);
}
.doc-toc ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  font-size: 0.9rem;
  line-height: 1.45;
}
.doc-toc li {
  counter-increment: toc;
}
.doc-toc li a {
  display: grid;
  grid-template-columns: 2.1em 1fr;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ct-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
}
.doc-toc.is-numbered li a::before {
  content: counter(toc) '.';
  color: var(--ct-faint);
  font-variant-numeric: tabular-nums;
}
.doc-toc:not(.is-numbered) li a {
  grid-template-columns: 1fr;
}
.doc-toc li a:hover {
  color: var(--ct-text);
  background: var(--ct-surface-2);
}
.doc-toc li a.is-active {
  color: var(--ct-accent);
  background: var(--ct-accent-soft);
  border-left-color: var(--ct-accent);
  font-weight: 600;
}

/* ---------- article body ---------- */
.doc-body {
  max-width: var(--ct-measure);
  font-size: 1.0625rem;
  line-height: 1.8;
  min-width: 0;
}
.doc-body > :first-child {
  margin-top: 0;
}
.doc-body h2 {
  margin: 48px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--ct-border);
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.6rem);
  position: relative;
}
.doc-body h2:first-child {
  border-top: 0;
  padding-top: 0;
}
.doc-body h3 {
  margin: 32px 0 8px;
  font-size: 1.15rem;
  position: relative;
}
.doc-body p,
.doc-body ul,
.doc-body ol,
.doc-body dl {
  margin: 0 0 16px;
}
.doc-body ul,
.doc-body ol {
  padding-left: 1.4em;
}
.doc-body li + li {
  margin-top: 6px;
}
.doc-body li::marker {
  color: var(--ct-faint);
}
.doc-body dt {
  font-weight: 700;
  margin-top: 12px;
}
.doc-body dd {
  margin: 4px 0 0;
  color: var(--ct-muted);
}
.doc-body strong {
  font-weight: 700;
}
.doc-body code,
.doc-body kbd {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--ct-code-bg);
  border-radius: 4px;
  padding: 1px 6px;
}
.doc-body kbd {
  border: 1px solid var(--ct-border);
  border-bottom-width: 2px;
}
.doc-body hr {
  border: 0;
  border-top: 1px solid var(--ct-border);
  margin: 32px 0;
}

/* heading self-link added by content.js */
.doc-anchor {
  margin-left: 8px;
  opacity: 0;
  color: var(--ct-faint) !important;
  text-decoration: none !important;
  font-weight: 400;
  transition: opacity 0.15s ease;
}
h2:hover .doc-anchor,
h3:hover .doc-anchor,
.doc-anchor:focus-visible {
  opacity: 1;
}

/* ---------- callouts ---------- */
.callout {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  margin: 24px 0;
  padding: 16px 18px;
  border: 1px solid var(--ct-border);
  border-left: 4px solid var(--ct-accent);
  border-radius: 10px;
  background: var(--ct-accent-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}
.callout > svg {
  margin-top: 4px;
  color: var(--ct-accent);
}
.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}
.callout-title {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}
.callout--note {
  background: var(--ct-note-bg);
  border-color: var(--ct-note-border);
  border-left-color: var(--ct-note-border);
  color: var(--ct-note-text);
}
.callout--note > svg {
  color: var(--ct-note-text);
}
.callout--warn {
  background: var(--ct-warn-bg);
  border-color: var(--ct-warn-border);
  border-left-color: var(--ct-warn-border);
  color: var(--ct-warn-text);
}
.callout--warn > svg {
  color: var(--ct-warn-text);
}
.callout--quote {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92rem;
}

/* summary box at the top of legal pages */
.doc-summary {
  margin: 0 0 32px;
  padding: 20px 22px;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface-2);
}
.doc-summary h2 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 1.1rem !important;
}
.doc-summary ul {
  margin: 0;
}

/* placeholders the owner still has to fill in */
.ph {
  background: var(--ct-note-bg);
  color: var(--ct-note-text);
  border-bottom: 1px dashed var(--ct-note-border);
  padding: 0 3px;
  border-radius: 3px;
}

/* ---------- tables ---------- */
.table-wrap {
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  -webkit-overflow-scrolling: touch;
}
.table-wrap:focus-visible {
  outline: 3px solid var(--ct-accent);
  outline-offset: 2px;
}
.doc-body table {
  display: table;
  margin: 0;
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.6;
}
.doc-body caption {
  caption-side: top;
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--ct-text);
  background: var(--ct-surface-2);
  border-bottom: 1px solid var(--ct-border);
}
.doc-body th,
.doc-body td {
  padding: 10px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ct-border);
}
.doc-body thead th {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ct-muted);
  background: var(--ct-surface);
  white-space: nowrap;
}
.doc-body tbody th {
  font-weight: 600;
}
.doc-body tbody tr:last-child > * {
  border-bottom: 0;
}
.doc-body td.num,
.doc-body th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- figures ---------- */
.doc-figure {
  margin: 28px 0;
  padding: 16px;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface);
}
.doc-figure svg {
  display: block;
  width: 100%;
  height: auto;
}
.doc-figure figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--ct-muted);
  line-height: 1.6;
}
.kb-key {
  stroke: var(--fg-key-stroke);
  stroke-width: 1;
}
.kb-text {
  fill: var(--fg-key-text);
  font-family: 'Noto Sans Thai', 'Sarabun', system-ui, sans-serif;
}
.kb-sub {
  fill: var(--ct-muted);
  font-family: system-ui, sans-serif;
}
.f-p { fill: var(--fg-pinky); }
.f-r { fill: var(--fg-ring); }
.f-m { fill: var(--fg-middle); }
.f-il { fill: var(--fg-index-l); }
.f-ir { fill: var(--fg-index-r); }
.f-t { fill: var(--fg-thumb); }
.f-none { fill: var(--ct-surface-2); }
.kb-home {
  stroke: var(--ct-accent);
  stroke-width: 2;
}
.fig-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--ct-muted);
}
.fig-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
}
.fig-legend i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 1px solid var(--fg-key-stroke);
  display: inline-block;
}
.fig-legend .sw-p { background: var(--fg-pinky); }
.fig-legend .sw-r { background: var(--fg-ring); }
.fig-legend .sw-m { background: var(--fg-middle); }
.fig-legend .sw-il { background: var(--fg-index-l); }
.fig-legend .sw-ir { background: var(--fg-index-r); }
.fig-legend .sw-t { background: var(--fg-thumb); }

/* ---------- steps ---------- */
.steps {
  list-style: none;
  padding: 0 !important;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 52px;
  margin: 0 0 20px !important;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ct-accent-soft);
  color: var(--ct-accent);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--ct-accent);
}
.steps > li > strong:first-child {
  display: block;
}

/* ---------- FAQ ---------- */
.faq {
  margin: 16px 0 0;
}
.faq details {
  border: 1px solid var(--ct-border);
  border-radius: 10px;
  background: var(--ct-surface);
  margin: 0 0 10px;
}
.faq summary {
  cursor: pointer;
  padding: 14px 44px 14px 16px;
  font-weight: 600;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ct-muted);
  border-bottom: 2px solid var(--ct-muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}
.faq .faq-a {
  padding: 0 16px 14px;
  color: var(--ct-muted);
}
.faq .faq-a p:last-child {
  margin-bottom: 0;
}

/* ---------- cards: guide index, related links, contact ---------- */
.doc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}
.doc-cards > li {
  margin: 0 !important;
}
.doc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface);
  color: var(--ct-text) !important;
  text-decoration: none !important;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
a.doc-card:hover {
  border-color: var(--ct-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 30, 40, 0.08);
}
.doc-card h2,
.doc-card h3 {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  font-size: 1.1rem !important;
}
.doc-card p {
  margin: 0;
  color: var(--ct-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.doc-card .card-more {
  margin-top: auto;
  color: var(--ct-accent);
  font-weight: 600;
  font-size: 0.9rem;
}
.doc-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--ct-accent-soft);
  color: var(--ct-accent);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin: 24px 0 8px;
  padding: 0;
  list-style: none;
}
.contact-grid > li {
  margin: 0 !important;
}
.contact-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  height: 100%;
  padding: 18px;
  border: 1px solid var(--ct-border);
  border-radius: var(--ct-radius);
  background: var(--ct-surface);
  color: var(--ct-text) !important;
  text-decoration: none !important;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.contact-card:hover {
  border-color: var(--ct-accent);
  transform: translateY(-2px);
}
.contact-card .ci {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
}
.contact-card .ci-fb { background: #1765d8; }
.contact-card .ci-line { background: #06a845; }
.contact-card .ci-tt { background: #111418; }
.contact-card .ci-mail { background: var(--primary, #5b4cf0); }
.contact-card strong {
  display: block;
  font-size: 1rem;
}
.contact-card span {
  display: block;
  font-size: 0.9rem;
  color: var(--ct-muted);
  overflow-wrap: anywhere;
}

.doc-related {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--ct-border);
}
.doc-related h2 {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 8px !important;
}

.doc-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0 0;
  padding: 22px 24px;
  border-radius: var(--ct-radius);
  border: 1px solid var(--ct-accent);
  background: var(--ct-accent-soft);
}
.doc-cta p {
  margin: 0;
  font-weight: 600;
}
.doc-cta .doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ct-accent);
  color: var(--ct-surface) !important;
  font-weight: 700;
  text-decoration: none !important;
}
.doc-cta .doc-btn:hover {
  background: var(--ct-accent-strong);
}

/* ---------- print ---------- */
@media print {
  :root {
    --ct-text: #000;
    --ct-muted: #222;
    --ct-faint: #444;
    --ct-border: #999;
    --ct-surface: #fff;
    --ct-surface-2: #fff;
    --ct-accent: #000;
    --ct-accent-soft: #fff;
  }
  header,
  footer,
  nav,
  .doc-toc,
  .doc-review-note,
  .doc-anchor,
  .doc-cta,
  .doc-related,
  .site-header,
  .site-footer {
    display: none !important;
  }
  .doc {
    padding: 0;
  }
  .doc-wrap {
    width: auto;
  }
  .doc-layout {
    display: block;
  }
  .doc-body {
    max-width: none;
    font-size: 11pt;
    line-height: 1.55;
  }
  .doc-body h2 {
    break-after: avoid;
    page-break-after: avoid;
    margin-top: 18pt;
  }
  .doc-body table,
  .callout,
  .doc-figure,
  .faq details {
    break-inside: avoid;
  }
  .faq details > .faq-a {
    display: block;
  }
  .doc-body a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    color: #333;
    overflow-wrap: anywhere;
  }
  .table-wrap {
    overflow: visible;
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .doc *,
  .doc *::before,
  .doc *::after {
    transition: none !important;
  }
}

@media (min-width: 980px) {
  .doc-layout--single {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* chart series (validated: blue/orange, light + dark surfaces) */
:root {
  --viz-1: #2a78d6;
  --viz-2: #eb6834;
  --viz-grid: var(--line, #e4e1f2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --viz-1: #3987e5;
    --viz-2: #d95926;
    --viz-grid: var(--line, #26264a);
  }
}
:root[data-theme='dark'] {
  --viz-1: #3987e5;
  --viz-2: #d95926;
  --viz-grid: var(--line, #26264a);
}
.viz-1 { fill: var(--viz-1); }
.viz-2 { fill: var(--viz-2); }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis { fill: var(--ct-muted); font-family: system-ui, 'Noto Sans Thai', sans-serif; font-size: 12px; }
.viz-label { fill: var(--ct-text); font-family: 'Noto Sans Thai', system-ui, sans-serif; font-size: 13px; }
.viz-bar:hover { opacity: 0.8; }
.fig-legend .sw-v1 { background: var(--viz-1); border-color: transparent; }
.fig-legend .sw-v2 { background: var(--viz-2); border-color: transparent; }
.tl-box { fill: var(--ct-surface-2); stroke: var(--ct-border); }
.tl-accent { fill: var(--ct-accent); }
.tl-line { stroke: var(--ct-accent); stroke-width: 2; fill: none; }
.tl-title { fill: var(--ct-text); font-family: 'Noto Sans Thai', system-ui, sans-serif; font-size: 14px; font-weight: 700; }
.tl-text { fill: var(--ct-muted); font-family: 'Noto Sans Thai', system-ui, sans-serif; font-size: 12px; }
.tl-num { fill: var(--ct-surface); font-family: system-ui, sans-serif; font-size: 13px; font-weight: 700; }

/* Thai text must not be letter-spaced or upper-cased */
html[lang='th'] .doc-eyebrow {
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.9rem;
}

/* card grids are lists without bullets or indentation (beats .prose ul / .doc-body ul) */
.doc-body ul.contact-grid,
.doc-body ul.doc-cards,
.doc-body ul.fig-legend {
  padding-left: 0;
  list-style: none;
}
.doc-body ul.contact-grid > li,
.doc-body ul.doc-cards > li {
  margin: 0;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 8px;
}

/* Comfortable tap targets (44px) for the table of contents */
.doc-toc summary { min-height: 44px; }
.doc-toc li a { align-items: center; min-height: 44px; padding: 8px 10px; }
