@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=Chonburi&display=swap");

:root {
  --bg: #f7f1e5;
  --surface: rgba(255, 252, 247, 0.92);
  --ink: #1a2433;
  --muted: #607083;
  --line: rgba(26, 36, 51, 0.12);
  --brand: #1d5f62;
  --brand-dark: #123c3f;
  --accent: #ec7d4a;
  --gold: #f2c875;
  --shadow: 0 24px 60px rgba(18, 37, 47, 0.12);
  --radius: 22px;
  --radius-sm: 16px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(242, 200, 117, 0.28), transparent 32%),
    radial-gradient(circle at top right, rgba(29, 95, 98, 0.18), transparent 28%),
    linear-gradient(180deg, #fcf7ef 0%, #f5efe2 100%);
  font-family: "IBM Plex Sans Thai", "Sarabun", "Noto Sans Thai", sans-serif;
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-underline-offset: 0.16em;
}

.wrap {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.page-shell,
.article-shell,
.header-inner,
.hero,
.section-heading,
.split,
.cta-band,
.stats-grid,
.card-grid,
.offer-grid,
.mini-card-grid,
.footer-grid,
.footer-note {
  min-width: 0;
}

.page-shell > *,
.article-shell > *,
.header-inner > *,
.hero > *,
.section-heading > *,
.split > *,
.cta-band > *,
.stats-grid > *,
.card-grid > *,
.offer-grid > *,
.mini-card-grid > *,
.footer-grid > *,
.footer-note > * {
  min-width: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(16px);
  background: rgba(252, 247, 239, 0.86);
  border-bottom: 1px solid rgba(26, 36, 51, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1 1 320px;
  text-decoration: none;
}

.brand > span:last-child {
  min-width: 0;
}

.brand strong {
  display: block;
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.brand-tagline {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  font-family: "Chonburi", serif;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(29, 95, 98, 0.1);
  color: var(--brand-dark);
}

main {
  padding: 36px 0 64px;
}

.page-shell,
.article-shell {
  display: grid;
  gap: 24px;
}

.article-shell {
  gap: 22px;
}

.hero-copy {
  display: grid;
  align-content: start;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: stretch;
  padding: 34px;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(140deg, rgba(18, 60, 63, 0.96), rgba(29, 95, 98, 0.88));
  color: #fff9f1;
  box-shadow: var(--shadow);
}

.compact-hero {
  margin-top: 0;
}

.hero h1 {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: "Chonburi", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
}

.lead {
  margin: 18px 0 0;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
  color: rgba(255, 249, 241, 0.88);
}

.article-shell .lead {
  max-width: 58ch;
}

.eyebrow,
.section-label,
.panel-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label {
  color: var(--brand);
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  max-width: 100%;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  text-align: center;
}

.button.secondary {
  border-color: rgba(255, 249, 241, 0.32);
  background: transparent;
  color: #fff;
}

.button.secondary.dark {
  border-color: rgba(18, 60, 63, 0.22);
  color: var(--brand-dark);
}

.hero-pills,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-pills span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 249, 241, 0.12);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.hero-panel,
.notice,
.section-card,
.card,
.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.hero-panel,
.notice {
  padding: 24px;
}

.stack {
  display: grid;
  gap: 12px;
}

.section-card {
  padding: 28px;
}

.stats-band {
  display: grid;
  gap: 22px;
}

.stats-grid,
.card-grid,
.offer-grid,
.mini-card-grid,
.footer-grid {
  display: grid;
  gap: 18px;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-grid div {
  padding: 18px;
  border-radius: var(--radius-sm);
  background: rgba(29, 95, 98, 0.06);
}

.stats-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-dark);
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.offer-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.mini-card {
  padding: 22px;
}

.card h3,
.card h2,
.mini-card-title {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}

.card p,
.mini-card-copy,
.notice p {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.offer-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.offer-card h3 a {
  text-decoration: none;
}

.offer-kicker {
  margin-top: auto;
  color: var(--brand-dark);
  font-weight: 600;
}

.offer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2,
.section-card h2 {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.checklist,
.steps {
  margin: 0;
  padding-left: 20px;
}

.checklist li,
.steps li {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.accent li::marker {
  color: var(--accent);
}

.prompt-block,
.prompt-mini {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background: #132a30;
  color: #f8f4eb;
  white-space: pre-wrap;
  font-family: "IBM Plex Sans Thai", monospace;
  line-height: 1.65;
}

.mini-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
}

.mini-card:hover,
.card:hover {
  transform: translateY(-2px);
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: var(--brand-dark);
  background: rgba(29, 95, 98, 0.06);
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(120deg, rgba(236, 125, 74, 0.16), rgba(29, 95, 98, 0.08)), var(--surface);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.94rem;
}

.breadcrumbs span:last-child {
  overflow-wrap: anywhere;
}

.article-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.article-image {
  align-self: center;
  width: 100%;
  border: 1px solid rgba(255, 249, 241, 0.18);
  border-radius: 18px;
  background: rgba(255, 249, 241, 0.08);
}

.page-image {
  aspect-ratio: 1200 / 760;
  object-fit: cover;
}

.article-shell h2 {
  font-size: clamp(1.36rem, 2.2vw, 1.72rem);
}

.article-shell p,
.article-shell li {
  font-size: 1rem;
  line-height: 1.75;
}

.article-shell .section-card,
.article-shell .notice {
  scroll-margin-top: 112px;
}

.article-inline-cta {
  background: linear-gradient(120deg, rgba(29, 95, 98, 0.08), rgba(236, 125, 74, 0.14)), var(--surface);
}

.article-inline-grid {
  align-items: stretch;
}

.article-inline-copy {
  margin: 0;
  color: var(--muted);
}

.article-inline-mini-grid {
  grid-template-columns: 1fr;
  align-content: start;
}

.micro-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.site-footer {
  padding: 20px 0 30px;
  border-top: 1px solid rgba(26, 36, 51, 0.08);
  background: rgba(255, 252, 247, 0.72);
}

.footer-grid {
  grid-template-columns: 1.15fr 0.75fr 0.75fr 0.75fr;
  padding: 24px 0;
}

.footer-grid a {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  text-decoration: none;
}

.footer-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.footer-note {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(26, 36, 51, 0.08);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 980px) {
  .hero,
  .article-hero,
  .split,
  .card-grid,
  .offer-grid,
  .mini-card-grid,
  .footer-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .cta-band,
  .footer-note {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(calc(100% - 24px), var(--max));
  }

  main {
    padding: 24px 0 56px;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 0;
  }

  .brand {
    flex-basis: auto;
  }

  .site-nav {
    justify-content: flex-start;
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: 0;
  }

  .site-nav a {
    flex: 0 1 auto;
  }

  .hero,
  .section-card,
  .card,
  .mini-card,
  .hero-panel,
  .notice {
    padding: 20px;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 9vw, 2.5rem);
  }

  .article-shell {
    gap: 18px;
  }

  .article-shell h2 {
    font-size: 1.28rem;
  }

  .section-heading {
    gap: 12px;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .offer-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }

  .hero-pills span,
  .card-meta span {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .article-shell .hero-pills span {
    justify-content: flex-start;
    text-align: left;
  }

  .breadcrumbs {
    font-size: 0.88rem;
  }

  th,
  td {
    padding: 12px;
  }

  table {
    min-width: 560px;
  }
}

@media (max-width: 520px) {
  .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .hero h1 {
    font-size: clamp(1.32rem, 7.3vw, 1.85rem);
  }

  .lead {
    font-size: 0.98rem;
  }

  .article-shell p,
  .article-shell li,
  .micro-note {
    font-size: 0.96rem;
  }

  .site-nav a {
    padding: 9px 12px;
  }

  .hero,
  .section-card,
  .card,
  .mini-card,
  .hero-panel,
  .notice {
    padding: 18px;
  }

  .prompt-block,
  .prompt-mini {
    padding: 14px;
    font-size: 0.95rem;
  }

  table {
    min-width: 520px;
  }
}
