/* ผักจด — เว็บไซต์ (0.6.2 F41) · สีเดียวกับแอป (Shared/DesignSystem/Theme.swift) · ฟอนต์โฮสต์เอง ไม่เรียกเว็บอื่น */

@font-face {
  font-family: "Mitr";
  src: url("/fonts/Mitr-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Mitr";
  src: url("/fonts/Mitr-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Anuphan";
  src: url("/fonts/Anuphan-Variable.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F1F6EC;
  --surface: #FFFFFF;
  --text: #1F2A1F;
  --text2: #6E7A6C;
  --divider: #E3EBDD;
  --border: #DDE6D6;
  --primary: #4FA863;
  --primary-deep: #3E8E5A;
  --primary-soft: #DDF1E2;
  --on-primary: #FFFFFF;
  --shadow: 0 6px 24px rgba(62, 142, 90, 0.08);
  --icon-shadow: 0 12px 32px rgba(62, 142, 90, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121A14;
    --surface: #1C2620;
    --text: #E8F0E4;
    --text2: #A3B09F;
    --divider: #2A362E;
    --border: #34423A;
    --primary: #5FBF74;
    --primary-deep: #8AD69A;
    --primary-soft: #22402B;
    --shadow: none;
    --icon-shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Anuphan", -apple-system, "Sukhumvit Set", "Thonburi", sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

a { color: var(--primary-deep); }
a:hover { text-decoration: underline; }

h1, h2, h3, .brand, .mitr {
  font-family: "Mitr", "Anuphan", sans-serif;
  font-weight: 600;
  line-height: 1.3;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* หัวเว็บ */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 24px;
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-shadow: var(--shadow);
}
.lang {
  font-family: "Anuphan", sans-serif;
  font-size: 18px;
  color: var(--text2);
  text-decoration: none;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 3px 18px;
}
.lang:hover { text-decoration: none; color: var(--text); }

/* หน้าแรก */
.hero { text-align: center; padding: 36px 0 8px; }
.hero-icon {
  width: 180px;
  height: 180px;
  border-radius: 40px;
  box-shadow: var(--icon-shadow);
}
.hero h1 { font-size: 48px; margin: 28px 0 8px; }
.hero .tagline { font-family: "Mitr", sans-serif; font-weight: 500; font-size: 26px; margin: 0 0 12px; }
.hero .lead { color: var(--text2); font-size: 20px; margin: 0 auto 20px; max-width: 34em; }
.pill {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 600;
  font-size: 17px;
  border-radius: 999px;
  padding: 6px 22px;
}

.steps { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.card {
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.step { display: flex; align-items: center; gap: 18px; padding: 18px 22px; }
.step strong { display: block; font-family: "Mitr", sans-serif; font-weight: 500; font-size: 21px; line-height: 1.35; }
.step span { color: var(--text2); font-size: 17px; }
.icon-circle {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-deep);
  display: grid;
  place-items: center;
}
.icon-circle svg { width: 26px; height: 26px; }

.local { margin-top: 18px; padding: 24px 26px 26px; border-radius: 28px; }
.local-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.local-head h2 { font-size: 26px; margin: 0; }
.mascot { width: 76px; height: auto; flex: none; }

.checks { list-style: none; margin: 0; padding: 0; }
.checks li { position: relative; padding: 6px 0 6px 44px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* หน้าเนื้อหา */
.page-title { font-size: 40px; margin: 28px 0 6px; }
.meta { color: var(--text2); font-size: 17px; margin: 0 0 22px; }
.meta a { font-weight: 600; text-decoration: none; }
.summary { background: var(--primary-soft); border-radius: 28px; padding: 22px 26px; margin-bottom: 8px; }
.doc .summary h2 { font-size: 20px; margin: 0 0 6px; }
.doc h2 { font-size: 26px; margin: 40px 0 10px; }
.doc h3 { font-size: 21px; margin: 28px 0 8px; }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 0 0 14px; padding-left: 24px; }
.doc li { margin-bottom: 8px; }
.doc li::marker { color: var(--text2); }
.doc code { font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; }
.note { color: var(--text2); font-size: 16px; }
.sub + .note { margin-top: -12px; margin-bottom: 22px; }
.table-wrap { overflow-x: auto; margin: 0 0 14px; }
.doc table { border-collapse: collapse; width: 100%; font-size: 16px; background: var(--surface); border-radius: 18px; overflow: hidden; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--divider); }
.doc th { font-family: "Mitr", sans-serif; font-weight: 500; background: var(--primary-soft); }
.doc tr:last-child td { border-bottom: none; }

/* ติดต่อ */
.sub { color: var(--text2); font-size: 19px; margin: 0 0 22px; }
.contact { display: flex; align-items: center; gap: 18px; padding: 22px 24px; border-radius: 28px; }
.contact.soft { background: var(--primary-soft); box-shadow: none; }
.contact.soft .icon-circle { background: var(--surface); }
.contact h2 { font-size: 22px; margin: 0; }
.contact p { margin: 2px 0 0; color: var(--text2); font-size: 17px; }
.email { margin-top: 16px; padding: 22px 24px; border-radius: 28px; }
.email .contact { padding: 0; }
.email-addr { word-break: break-all; }
.button {
  display: block;
  margin: 20px 0 12px;
  background: var(--primary);
  color: var(--on-primary);
  text-align: center;
  text-decoration: none;
  font-family: "Mitr", sans-serif;
  font-weight: 500;
  font-size: 22px;
  border-radius: 999px;
  padding: 14px;
}
.button:hover { text-decoration: none; filter: brightness(1.05); }
.hint { text-align: center; color: var(--text2); font-size: 16px; margin: 0; }

.faq-title { font-size: 28px; margin: 40px 0 14px; }
.faq { padding: 6px 24px; border-radius: 28px; }
.faq details { border-bottom: 1px solid var(--divider); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  font-size: 19px;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text2); font-weight: 400; font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq .answer { color: var(--text2); padding: 0 0 18px; }
.faq .answer p { margin: 0 0 10px; }
.faq .answer ul { margin: 0 0 10px; padding-left: 22px; }

/* ท้ายเว็บ */
.foot { margin-top: 48px; border-top: 1px solid var(--divider); padding: 28px 0 40px; text-align: center; }
.foot nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; }
.foot nav a { font-family: "Mitr", sans-serif; font-weight: 500; font-size: 19px; text-decoration: none; }
.foot p { color: var(--text2); font-size: 16px; margin: 10px 0 0; }

/* ตารางบนจอแคบ: แถว = การ์ด · หัวคอลัมน์ขึ้นเป็นป้ายในแต่ละช่อง */
@media (max-width: 600px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc table { background: none; border-radius: 0; }
  .doc thead { display: none; }
  .doc tr { background: var(--surface); border-radius: 20px; padding: 6px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
  .doc td { border-bottom: 1px solid var(--divider); padding: 10px 0; }
  .doc tr td:last-child { border-bottom: none; }
  .doc td::before { content: attr(data-label); display: block; font-family: "Mitr", sans-serif; font-weight: 500; color: var(--primary-deep); font-size: 15px; }
  .doc td:first-child { font-family: "Mitr", sans-serif; font-weight: 500; font-size: 18px; }
  .doc td:first-child::before { display: none; }
}

:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }

@media (max-width: 440px) {
  body { font-size: 17px; }
  .hero-icon { width: 150px; height: 150px; border-radius: 34px; }
  .hero h1 { font-size: 42px; margin-top: 22px; }
  .hero .tagline { font-size: 22px; }
  .hero .lead { font-size: 17px; }
  .pill { font-size: 14px; padding: 6px 14px; }
  .page-title { font-size: 34px; }
  .step { padding: 16px; gap: 14px; }
  .step strong { font-size: 17px; }
  .step span { font-size: 15px; }
  .icon-circle { width: 46px; height: 46px; }
  .icon-circle svg { width: 22px; height: 22px; }
  .local { padding: 20px; }
  .local-head h2 { font-size: 23px; }
  .mascot { width: 64px; }
  .doc h2 { font-size: 23px; }
  .doc h3 { font-size: 19px; }
  .contact h2 { font-size: 19px; }
  .contact p { font-size: 15px; }
  .faq { padding: 4px 18px; }
  .faq summary { font-size: 17px; }
  .faq-title { font-size: 25px; }
  .foot nav a { font-size: 17px; }
}
