/* THE FACT HUNTER FAMILY: หน้ารับสมัคร (body.fh) ตาม KV และหลังบ้าน (body.fha) */
@font-face { font-family: 'FHF Kanit'; font-style: italic; font-weight: 800; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/kanit@5.3.0/files/kanit-thai-800-italic.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'FHF Kanit'; font-style: italic; font-weight: 800; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/kanit@5.3.0/files/kanit-latin-800-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'FHF Kanit'; font-style: normal; font-weight: 600; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/kanit@5.3.0/files/kanit-thai-500-normal.woff2') format('woff2'); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: 'FHF Kanit'; font-style: normal; font-weight: 600; font-display: swap; src: url('https://cdn.jsdelivr.net/npm/@fontsource/kanit@5.3.0/files/kanit-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }
body.fh, body.fha { --y: #FBCC04; --y2: #FCE300; --b: #069AF0; --b-d: #0479C2; --n: #18355F; --n-d: #09111E; --r: #FF1715; --g: #5DB347; --ink: #0E1A33; --mut: #4A5670; --line: #C9D7EA; }
body.fh { background: #EAF6FE; color: var(--ink); margin: 0; }
body.fha { background: #F2F5FB; color: #0E1A33; }
body.fh a, body.fha a { color: #0479C2; }
body.fh a:hover, body.fha a:hover { color: var(--n); }
.fh-loading { text-align: center; color: #4A5670; padding: 40px 16px; }
[hidden] { display: none !important; }
.fh-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fh-disp, .fh-label, .fh-tagline b, .fh-card h2, .fh-h, .fh-formhead .fh-t, .fh-submit, .fh-step span, .fh-done h2, .fh-closed h2 { font-family: 'FHF Kanit', inherit; }

/* ===== ครึ่งซ้าย: KV + เกณฑ์ ===== */
.fh-wrap { min-height: 100vh; }
.fh-side { background: var(--b); color: #FFFFFF; }
.fh-side-in { max-width: 640px; margin: 0 auto; }
.fh-kv { display: block; width: 100%; height: auto; }
.fh-side-body { background: var(--b); padding: 12px 20px 28px; display: flex; flex-direction: column; gap: 16px; }
.fh-tagline { margin: 0; font-size: 20px; line-height: 1.35; color: #FFFFFF; text-align: center; text-shadow: 0 2px 0 rgba(9,17,30,.25); }
.fh-tagline b { display: block; font-style: italic; font-weight: 800; font-size: 26px; }
.fh-crit { background: #FFFFFF; color: var(--ink); border-radius: 20px; padding: 26px 20px 18px; position: relative; margin-top: 18px; box-shadow: 0 6px 0 var(--n); }
.fh-label { position: absolute; top: -20px; left: 16px; margin: 0; background: var(--y2); color: var(--n-d); font-style: italic; font-weight: 800; font-size: 22px; padding: 4px 20px; border-radius: 10px; transform: rotate(-2deg); box-shadow: 4px 4px 0 var(--n); }
.fh-checks { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fh-checks li { position: relative; padding-left: 38px; font-size: 16px; line-height: 1.5; }
.fh-checks li::before { content: ''; position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--g); }
.fh-checks li::after { content: ''; position: absolute; left: 8px; top: 6px; width: 7px; height: 12px; border: solid var(--n); border-width: 0 3.5px 3.5px 0; transform: rotate(40deg); }
.fh-checks b { display: block; color: var(--n); }
.fh-checks span { display: block; font-size: 14px; color: var(--mut); }
.fh-box { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 16px; padding: 14px 16px; }
.fh-box h2 { margin: 0 0 10px; font-size: 17px; color: #FFFFFF; }
.fh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fh-chips span { font-size: 14px; font-weight: 600; background: #FFFFFF; color: var(--n); padding: 5px 12px; border-radius: 999px; }
.fh-steps { margin: 0; padding-left: 22px; font-size: 15px; line-height: 1.6; }
.fh-steps li + li { margin-top: 4px; }
.fh-steps b { color: var(--y2); }
.fh-side-fine { margin: 0; font-size: 13px; line-height: 1.7; color: #E6F4FF; text-align: center; }
body.fh .fh-side-fine a { color: #FFFFFF; font-weight: 600; }

/* ===== ครึ่งขวา: ฟอร์ม ===== */
.fh-formcol { display: flex; flex-direction: column; }
.fh-formhead { display: flex; align-items: center; gap: 14px; max-width: 680px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: 22px 16px 4px; }
.fh-home img { display: block; height: 48px; width: auto; }
.fh-formhead .fh-k { margin: 0; font-size: 13px; font-weight: 600; color: var(--b-d); }
.fh-formhead .fh-t { margin: 0; font-size: 20px; font-style: italic; font-weight: 800; color: var(--n); line-height: 1.2; }
.fh-formhead .fh-t span { color: var(--b); }
.fh-main { max-width: 680px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: 16px 16px 32px; }
.fh-form { display: flex; flex-direction: column; gap: 16px; }
.fh-card { background: #FFFFFF; border-radius: 18px; padding: 20px 18px; display: flex; flex-direction: column; gap: 16px; border: 2px solid var(--n); box-shadow: 0 5px 0 var(--n); }
.fh-card h2, .fh-h { margin: 0; font-size: 21px; font-style: italic; font-weight: 800; color: var(--n); }
.fh-step { display: flex; align-items: center; gap: 10px; }
.fh-step span { width: 36px; height: 36px; border-radius: 50%; background: var(--y2); color: var(--n-d); font-weight: 800; font-style: italic; font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; border: 2px solid var(--n); }
.fh-sub { margin: 4px 0 0; font-size: 14px; color: var(--mut); line-height: 1.6; }
.fh-note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--n); background: #E3F3FE; border-radius: 10px; padding: 10px 12px; }

.fh-field { display: flex; flex-direction: column; min-width: 0; }
.fh-field > label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.fh-opt { font-weight: 400; color: var(--mut); }
body.fh .fh-field input:not([type=checkbox]):not([type=file]), body.fh .fh-field select, body.fh .fh-field textarea {
  box-sizing: border-box; width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #FFFFFF;
  border: 1.5px solid #8EA0BE; border-radius: 12px; padding: 12px 14px; min-height: 48px; margin: 0; }
body.fh .fh-field textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
body.fh .fh-field input:focus, body.fh .fh-field select:focus, body.fh .fh-field textarea:focus { outline: 3px solid #9FD6FA; border-color: var(--b); }
.fh-hint { font-size: 13px; color: var(--mut); margin: 6px 0 0; line-height: 1.5; }
.fh-err { font-size: 14px; color: #B3261E; margin: 6px 0 0; font-weight: 600; }
.fh-bad input:not([type=checkbox]), .fh-bad select, .fh-bad textarea, .fh-bad .fh-drop { border-color: #B3261E !important; }
.fh-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fh-ck { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--ink); cursor: pointer; font-weight: 400; margin: 0; }
.fh-ck input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--n); }
.fh-minor { background: #FFF8D1; border: 1.5px solid var(--y); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.fh-minor-t { margin: 0; font-weight: 700; font-size: 15px; color: #6B4A00; }

body.fh label.fh-drop { margin: 0; border: 2px dashed var(--b); border-radius: 16px; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--mut); background: #F1F9FF; cursor: pointer; text-align: center; padding: 16px; }
.fh-drop-ic { font-size: 34px; line-height: 1; }
.fh-drop-t { font-weight: 700; color: var(--b-d); font-size: 16px; }
.fh-drop-s { font-size: 13px; }
.fh-file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fh-field:focus-within .fh-drop { outline: 3px solid #9FD6FA; }
.fh-preview { display: block; margin-top: 12px; width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: #F1F9FF; }

.fh-avail { border: 0; margin: 0; padding: 0; }
.fh-avail legend { font-size: 15px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.fh-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.fh-pill { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px solid #8EA0BE; background: #FFFFFF; border-radius: 999px; font-size: 15px; margin: 0; font-weight: 500; cursor: pointer; }
.fh-pill:has(input:checked) { border-color: var(--n); background: var(--y2); color: var(--n-d); font-weight: 600; }
.fh-pill input { width: 18px; height: 18px; margin: 0; accent-color: var(--n); }
.fh-extra { border-style: dashed; box-shadow: none; }
.fh-extra .fh-h { font-size: 18px; }
.fh-ts { min-height: 66px; }
.fh-submit { min-height: 60px; border: 2px solid var(--n); border-radius: 16px; background: var(--y2); color: var(--n-d); font-size: 22px; font-style: italic; font-weight: 800; cursor: pointer; box-shadow: 0 6px 0 var(--n); transition: transform .08s, box-shadow .08s; }
.fh-submit:hover { background: var(--y); }
.fh-submit:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--n); }
.fh-submit:disabled { background: #E7DFA9; cursor: wait; }
.fh-form-err { margin: 0; background: #FDECEA; color: #8C1D18; border-radius: 12px; padding: 12px 14px; font-size: 15px; font-weight: 600; }
.fh-fine { margin: 0; font-size: 13px; line-height: 1.6; color: var(--mut); text-align: center; }
.fh-preview-bar { margin: 0 0 16px; background: #FFF8D1; border: 1.5px solid var(--y); color: #6B4A00; border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 14px; }
.fh-closed { text-align: center; }
.fh-closed p { margin: 0; line-height: 1.7; color: var(--mut); }

.fh-done { text-align: center; align-items: center; }
.fh-done p { margin: 0; line-height: 1.7; }
.fh-done h2 { font-size: 26px; }
.fh-done-ic { width: 68px; height: 68px; border-radius: 50%; background: var(--g); color: var(--n); font-size: 36px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 3px solid var(--n); }
.fh-sum { width: 100%; box-sizing: border-box; background: #E3F3FE; border-radius: 12px; padding: 12px 16px; text-align: left; }
.fh-sum-r { display: flex; gap: 12px; padding: 5px 0; font-size: 15px; }
.fh-sum-r span { width: 110px; flex: none; color: var(--mut); }
.fh-line { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border-radius: 999px; background: var(--n); color: #FFFFFF !important; text-decoration: none; font-weight: 600; }
.fh-foot { max-width: 680px; width: 100%; box-sizing: border-box; margin: 0 auto; padding: 0 16px 32px; font-size: 13px; color: var(--mut); text-align: center; line-height: 1.7; }
.fh-foot p { margin: 0; }

/* จอใหญ่: แบ่งครึ่งหน้า ซ้ายเกณฑ์ (ค้างไว้) ขวาฟอร์ม */
@media (min-width: 980px) {
  .fh-wrap { display: grid; grid-template-columns: 1fr 1fr; }
  .fh-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--b); }
  .fh-side-in { max-width: 640px; }
  .fh-kv { width: min(100%, 520px); margin: 32px auto 0; border-radius: 20px; box-shadow: 0 6px 0 var(--n); }
  .fh-side-body { padding: 16px 32px 36px; }
  .fh-formcol { min-height: 100vh; }
  .fh-formhead { padding-top: 32px; }
}
/* brand.css ย่อหน้าเป็น zoom .85 ที่จอ 900px ขึ้นไป ทำให้ 100vh สั้นกว่าจอจริง */
@media (min-width: 980px) { .fh-side { height: calc(100vh / 0.85); } .fh-wrap, .fh-formcol { min-height: calc(100vh / 0.85); } }

/* ===== หลังบ้าน ===== */
.adm-topnav a[aria-current="page"] { font-weight: 700; }
.fha-main { max-width: 1320px; margin: 0 auto; padding: 24px 24px 48px; display: flex; flex-direction: column; gap: 18px; }
.fha-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.fha-head h1 { margin: 6px 0 4px; font-size: 26px; color: #0E1A33; }
.fha-head h1 small { font-size: 15px; font-weight: 500; color: #4A5670; }
.fha-head p { margin: 0; font-size: 15px; color: #4A5670; }
.fha-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.fha-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid #9AA6BE; background: #FFFFFF; font: inherit; font-size: 15px; font-weight: 600; color: #0E1A33 !important; text-decoration: none; cursor: pointer; }
.fha-btn.blue { border-color: #1D4FD8; color: #1D4FD8 !important; }
.fha-btn.off { opacity: .4; cursor: default; }
.fha-btn:disabled { opacity: .5; }
.fha-open { display: inline-flex; align-items: center; gap: 8px; background: #EEF1F7; color: #4A5670; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px; }
.fha-open i { width: 8px; height: 8px; border-radius: 50%; background: #8FA2C6; }
.fha-open.on { background: #E4F4EA; color: #1F5C37; }
.fha-open.on i { background: #1F7A45; }
.fha-purge { margin: 0; background: #FFF3E6; color: #7A3E00; border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.fha-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.fha-stats > div { background: #FFFFFF; border-radius: 16px; padding: 14px 18px; border: 1px solid #C9D2E4; }
.fha-stats p { margin: 0; font-size: 14px; color: #4A5670; }
.fha-stats b { display: block; margin-top: 2px; font-size: 30px; color: #0B2559; }
.fha-stats .st-short b { color: #1D4FD8; } .fha-stats .st-interview b { color: #B35A00; } .fha-stats .st-selected b { color: #1F7A45; }
.fha-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.fha-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.fha-tabs button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #9AA6BE; background: #FFFFFF; color: #0E1A33; font: inherit; font-size: 15px; cursor: pointer; }
.fha-tabs button[aria-selected="true"] { border-color: #0B2559; background: #0B2559; color: #FFFFFF; font-weight: 600; }
.fha-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.fha-tools input, .fha-tools select { min-height: 44px; font: inherit; font-size: 15px; border: 1px solid #9AA6BE; border-radius: 12px; padding: 0 12px; background: #FFFFFF; color: #0E1A33; }
.fha-tools input { width: 240px; }
.fha-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.fha-team { background: #FFFFFF; border-radius: 18px; border: 1px solid #C9D2E4; overflow: hidden; text-decoration: none; color: #0E1A33 !important; display: flex; flex-direction: column; }
.fha-team:hover { border-color: #1D4FD8; }
.fha-ph { height: 180px; background: #DCE4F7; position: relative; }
.fha-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fha-pill, .fha-minor { position: absolute; top: 12px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #FFFFFF; color: #0E1A33; }
.fha-pill { left: 12px; }
.fha-pill.st-short { background: #1D4FD8; color: #FFFFFF; } .fha-pill.st-interview { background: #FF8A1F; } .fha-pill.st-selected { background: #1F7A45; color: #FFFFFF; } .fha-pill.st-rejected { background: #4A5670; color: #FFFFFF; }
.fha-minor { right: 12px; background: #FFF3E6; color: #7A3E00; font-weight: 600; font-size: 12px; }
.fha-tb { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: #4A5670; }
.fha-tt { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fha-tt b { font-size: 17px; color: #0E1A33; } .fha-tt span { font-size: 13px; }
.fha-tm { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; }
.fha-tm span:last-child { color: #1D4FD8; font-weight: 600; }
.fha-empty, .fha-muted { color: #4A5670; font-size: 14px; line-height: 1.6; margin: 0; }
.fha-detail { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.fha-left { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.fha-right { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.fha-big img { display: block; width: 100%; max-height: 520px; object-fit: contain; border-radius: 20px; background: #DCE4F7; }
.fha-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.fha-box { background: #FFFFFF; border-radius: 18px; padding: 18px 20px; border: 1px solid #C9D2E4; display: flex; flex-direction: column; gap: 6px; }
.fha-box p { margin: 0; font-size: 15px; line-height: 1.6; }
.fha-box h2 { margin: 0 0 6px; font-size: 18px; color: #0E1A33; }
.fha-k { font-size: 13px !important; font-weight: 600; color: #4A5670; }
.fha-name { font-size: 20px !important; font-weight: 700; }
.fha-minor-note { margin-top: 6px !important; font-size: 13px !important; font-weight: 600; background: #FFF3E6; color: #7A3E00; border-radius: 8px; padding: 6px 10px; }
.fha-qa h2 { font-size: 15px; color: #4A5670; margin: 10px 0 2px; }
.fha-qa h2:first-child { margin-top: 0; }
.fha-qa > p { font-size: 16px; line-height: 1.75; white-space: pre-line; }
.fha-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 14px; margin-top: 8px; border-top: 1px solid #C9D2E4; font-size: 15px; word-break: break-all; }
.fha-st { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fha-st button { min-height: 44px; border-radius: 12px; font: inherit; font-size: 15px; font-weight: 600; border: 1px solid #9AA6BE; background: #FFFFFF; color: #0E1A33; cursor: pointer; }
.fha-st button[aria-pressed="true"] { border-color: #0B2559; background: #0B2559; color: #FFFFFF; }
.fha-contact { display: flex; gap: 8px; margin-top: 6px; }
.fha-contact a { flex: 1; }
.fha-notes { display: flex; flex-direction: column; gap: 8px; }
.fha-note { background: #F2F5FB; border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.fha-note span { color: #4A5670; font-size: 13px; }
.fha-note p { margin: 4px 0 0; white-space: pre-line; }
.fha-right label { font-size: 15px; font-weight: 600; margin-top: 6px; }
.fha-right textarea { box-sizing: border-box; width: 100%; min-height: 88px; font: inherit; font-size: 15px; border: 1px solid #9AA6BE; border-radius: 12px; padding: 10px 12px; resize: vertical; }
.fha-right .fha-box > .fha-btn { align-self: flex-end; }
.fha-del { align-self: flex-start; border-color: #B3261E; color: #B3261E !important; }
@media (max-width: 700px) { .fha-main { padding: 16px; } .fha-tools input { width: 100%; } }
