/* Ch289 Thai — a narrow book, not a card layout.
   Sampled from images/ch289thai-logo.png: cream #f8e8d0, marigold #f0a800.
   Reading ink is deep indigo so the marigold numerals stay clear on the paper. */
:root {
  --paper: #f7f1e6;
  --cream: #f8e8d0;
  --ink: #1a2144;
  --indigo: #24306e;
  --indigo-deep: #1a234f;
  --muted: #5c5670;
  --marigold: #f0a800;
  --rule: #e4d3b4;
  --font: "Leelawadee UI", Tahoma, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--indigo);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  background: none;
  border-radius: 0;
}

a:hover { color: var(--indigo-deep); }

a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 3px;
}

.lm-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 22px;
}

.lm-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  color: var(--indigo);
  background: var(--paper);
  padding: 8px 0;
}

.lm-skip:focus { left: 22px; top: 12px; }

.lm-header {
  position: static;
  z-index: auto;
  background: transparent;
  border: 0;
  text-align: center;
}

.lm-header-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  min-height: 0;
  padding: 2.5rem 0 0.15rem;
}

.lm-brand {
  display: flex;
  justify-content: center;
  width: 100%;
  text-decoration: none;
}

.lm-brand img { height: 68px; width: auto; margin: 0 auto; }
.lm-brand amp-img { margin: 0 auto; }

.lm-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 0.85rem;
  list-style: none;
  width: 100%;
  margin: 0.9rem 0 0;
  padding: 0.65rem 0 0;
  overflow: visible;
  border-top: 1px solid var(--marigold);
}

.lm-nav a {
  color: var(--indigo);
  font-weight: 400;
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: normal;
  text-decoration: underline;
  padding: 0;
  border-radius: 0;
  background: none;
}

.lm-nav a:hover,
.lm-nav a[aria-current="page"] {
  color: var(--indigo);
  background: none;
  border-radius: 0;
}

.lm-nav a[aria-current="page"] {
  text-decoration-color: var(--marigold);
  text-decoration-thickness: 2px;
}

.lm-btn,
.lm-hero-cta a,
.lm-cta-row a,
.lm-actions a {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--indigo);
  font-weight: 400;
  font-size: inherit;
  text-decoration: underline;
}

.lm-hero { padding: 1.35rem 0 0; }

.lm-bc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--muted);
}

.lm-bc a { color: var(--indigo); font-weight: 400; text-decoration: underline; }

.lm-hero-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.lm-hero-body { order: -1; display: block; padding: 0; }

.lm-h1 {
  font-family: var(--font);
  font-size: 2rem;
  line-height: 1.35;
  font-weight: 700;
  margin: 0.15rem 0 0.85rem;
  overflow-wrap: break-word;
}

.lm-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.lm-tag-pill {
  display: inline;
  background: none;
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

.lm-hero-media,
.lm-fig {
  display: block;
  margin: 0.4rem 0 1.15rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.lm-hero-media img,
.lm-fig img,
.lm-hero-media amp-img,
.lm-fig amp-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  background: transparent;
  border-radius: 0;
}

.lm-hero-media amp-img img,
.lm-fig amp-img img { object-fit: contain; }

.lm-fig figcaption,
.lm-hero-media figcaption {
  padding: 0.45rem 0 0;
  font-size: 0.92rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--muted);
}

main { counter-reset: ch; }

.lm-main-wrap { padding: 0 0 3rem; }

.lm-content-grid {
  display: block;
}

.lm-summary,
.lm-facts,
.lm-toc,
.lm-article {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.lm-summary { margin-top: 0.4rem; }

.lm-summary p { margin: 0 0 1rem; }

main h2 {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 0.7rem;
  align-items: baseline;
  margin: 2rem 0 0.75rem;
  font-family: var(--font);
  font-size: 1.32rem;
  line-height: 1.45;
  font-weight: 700;
}

main h2::before {
  content: counter(ch, decimal-leading-zero);
  counter-increment: ch;
  color: var(--marigold);
  font-size: 2.35rem;
  font-weight: 600;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}

.lm-article section { margin: 0 0 0.4rem; }

.lm-article p,
.lm-summary p { font-size: 1.05rem; }

.lm-facts h3 {
  margin: 1.4rem 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 700;
}

.lm-facts dl { margin: 0 0 0.6rem; }

.lm-fact-row {
  display: grid;
  grid-template-columns: 9.2rem minmax(0, 1fr);
  gap: 0.35rem 0.8rem;
  border-top: 1px solid var(--rule);
  padding: 0.28rem 0;
}

.lm-facts dt {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 400;
  font-style: italic;
}

.lm-facts dd {
  margin: 0;
  font-weight: 400;
  font-size: 1rem;
}

.lm-toc { margin: 0.4rem 0 0.2rem; }
.lm-toc strong { display: block; margin: 0.8rem 0 0.2rem; font-size: 0.95rem; }

.lm-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lm-toc li { margin: 0; }

.lm-toc a {
  color: var(--indigo);
  text-decoration: underline;
  font-size: 1rem;
  font-weight: 400;
}

.lm-table-wrap {
  overflow-x: auto;
  margin: 0.8rem 0 1.1rem;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.lm-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.98rem;
  line-height: 1.6;
}

.lm-table caption {
  padding: 0 0 0.4rem;
  font-weight: 700;
  text-align: left;
  background: transparent;
  caption-side: top;
}

.lm-table th,
.lm-table td {
  padding: 0.4rem 0.45rem 0.4rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  background: transparent;
}

.lm-table thead th {
  color: var(--indigo);
  font-weight: 700;
}

.lm-steps {
  margin: 0.2rem 0 1rem;
  padding-left: 1.35rem;
}

.lm-steps li { padding-left: 0.2rem; }

.lm-card-grid { display: block; margin: 0.2rem 0 0.4rem; }

.lm-info-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 0.85rem;
}

.lm-info-card h3 {
  margin: 0.85rem 0 0.1rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.lm-info-card p { margin: 0; color: var(--ink); font-size: 1.05rem; }

.lm-faq details {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.55rem 0;
  margin: 0;
}

.lm-faq details:last-child { border-bottom: 1px solid var(--rule); }

.lm-faq summary { cursor: pointer; font-weight: 700; line-height: 1.5; }
.lm-faq p { margin: 0.35rem 0 0.2rem; color: var(--ink); font-size: 1.05rem; }

.lm-related { margin-top: 0.2rem; }

.lm-reading {
  margin: 0.2rem 0 0.6rem;
  padding-left: 1.35rem;
}

.lm-reading li { padding-left: 0.25rem; }
.lm-reading a { font-weight: 400; }

.lm-footer {
  background: transparent;
  border-top: 1px solid var(--marigold);
  padding: 1.6rem 0 2rem;
  margin-top: 1.5rem;
}

.lm-footer-grid { display: block; border: 0; padding: 0; }

.lm-footer-logo {
  height: 52px;
  width: auto;
  margin: 0 auto 0.8rem;
}

.lm-footer h2 {
  display: block;
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 700;
  margin: 1.35rem 0 0.25rem;
}

.lm-footer h2::before { content: none; }

.lm-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lm-footer li { margin: 0; }

.lm-footer a {
  color: var(--indigo);
  text-decoration: underline;
  font-size: 0.98rem;
}

.lm-footer p { color: var(--ink); font-size: 1rem; margin: 0.3rem 0 0.6rem; }

.lm-badges {
  display: block;
  margin-top: 0.3rem;
  font-style: italic;
  color: var(--muted);
  font-size: 0.92rem;
}

.lm-badge {
  display: inline;
  font-size: inherit;
  font-weight: 400;
  font-style: italic;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
}

.lm-badge + .lm-badge::before { content: " · "; }

.lm-copy {
  padding-top: 1.1rem;
  margin-top: 1.1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 560px) {
  .lm-h1 { font-size: 1.65rem; }
  main h2 { grid-template-columns: 2.7rem minmax(0, 1fr); font-size: 1.18rem; }
  main h2::before { font-size: 1.85rem; }
  .lm-fact-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
