/* หน้าแบบฟอร์มศาล (forms.html และ forms/*.html) แนวเดียวกับหน้าแรก
   ใช้คู่กับ shell.css หน้าเหล่านี้สร้างจาก tools/build_forms.py */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: #fff; color: var(--g-ink); font-family: var(--g-font); font-size: 1.0625rem; line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
a { color: var(--g-blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--g-blue); outline-offset: 3px; border-radius: 6px; }
.kicker { color: var(--g-blue); font-weight: 600; margin-bottom: 10px; }
.lead { color: var(--g-ink-2); font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: .8125rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #e8f0fe; color: #1d4ed8; white-space: nowrap; }
.badge--plain { background: var(--g-mist); color: var(--g-ink-2); }

/* ---------- หน้ารวม ---------- */
.hub-hero { padding-block: clamp(56px, 8vw, 104px) clamp(32px, 4vw, 48px); text-align: center; }
.hub-hero h1 { font-size: clamp(2.3rem, 1.4rem + 3vw, 3.5rem); line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.hub-hero .lead { margin: 18px auto 0; max-width: 40em; }
.toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.toc a { padding: 6px 14px; border-radius: 999px; background: var(--g-mist); color: var(--g-ink); font-size: .875rem; }
.toc a:hover { background: #e8e8ed; text-decoration: none; }
.toc b { color: var(--g-ink-2); font-weight: 500; margin-left: 2px; }
.cat { padding-block: clamp(28px, 4vw, 48px); border-top: 1px solid var(--g-line); }
.cat h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700; margin-bottom: 20px; }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 16px; }
.card { display: grid; gap: 10px; align-content: start; height: 100%; padding: 12px 12px 16px; border-radius: 18px; background: var(--g-mist); color: var(--g-ink); transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0, 0, 0, .08); }
.card__img { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card__title { font-weight: 600; line-height: 1.45; }
.noimg { display: block; width: 100%; height: 100%; }

/* ---------- หน้าแบบฟอร์ม ---------- */
.form { padding-block: 24px clamp(56px, 8vw, 96px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .875rem; color: var(--g-ink-2); margin-bottom: clamp(24px, 4vw, 48px); }
.crumbs a { color: var(--g-ink-2); }
.form__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.form h1 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3rem); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
.form .lead { margin-top: 14px; }
.facts { display: grid; margin-top: 28px; border-top: 1px solid var(--g-line); }
.facts div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--g-line); }
.facts dt { color: var(--g-ink-2); }
.sheet { position: sticky; top: 76px; }
.sheet img { border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), 0 24px 60px rgba(0, 0, 0, .12); }
.sheet figcaption { margin-top: 10px; text-align: center; color: var(--g-ink-2); font-size: .875rem; }
.get { margin-top: 32px; padding: clamp(24px, 3vw, 36px); border-radius: 28px; background: radial-gradient(500px 260px at 100% 0%, rgba(37, 99, 235, .35), transparent 70%), #161618; color: #f5f5f7; }
.get h2 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); line-height: 1.35; font-weight: 700; }
.get p { margin-top: 10px; color: #a1a1a6; }
.get__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 20px; }
.get .more { color: var(--g-blue-night); }
.related { margin-top: clamp(48px, 7vw, 88px); padding-top: 32px; border-top: 1px solid var(--g-line); }
.related h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 14px; }
.related ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 4px 24px; margin-bottom: 18px; }
.related li a { display: block; padding-block: 8px; color: var(--g-ink); border-bottom: 1px solid var(--g-mist); }
@media (max-width: 859px) {
  .form__grid { grid-template-columns: 1fr; }
  .sheet { position: static; max-width: 520px; }
}
.hub-hero + .gwrap .get { margin-block: 24px 72px; }
