/* =========================================================
   Registration form — isolated from editorial page styles
   ========================================================= */
#form.consult { padding: 30px 30px 100px; background: var(--paper); }
#form .form-shell { overflow: hidden; max-width: 900px; margin: 0 auto; border: 1px solid #dfd2c8; border-radius: 26px; background: #f7f2ec; box-shadow: 0 22px 60px rgba(69,45,32,.1); }
#form .Form { padding: 48px 44px; background: #fffdf9; }
#form .form-intro { margin: 0 0 32px; text-align: center; }
#form .form-intro > p:last-child { margin: 0; color: #776860; }
#form .form-grid { display: grid; gap: 20px 18px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
#form .form-grid > li { margin: 0; padding: 0; list-style: none; }
#form label, #form .form-field > p, #form .course-interest > p { display: block; margin: 0 0 8px; color: #4a3c35; font-weight: 800; letter-spacing: .04em; }
#form #BranchType label {font-weight: 400;}
#form label span { color: #c96442; }
#form input[type="text"], #form select { width: 100%; height: 50px; padding: 0 14px; border: 1px solid #d8c9bf; border-radius: 8px; background: #fff; color: #342b27; outline: none; transition: border-color .2s ease, box-shadow .2s ease; }
#form input[type="text"]:focus, #form select:focus { border-color: #c96442; box-shadow: 0 0 0 3px rgba(201,100,66,.13); }
#form .course-interest, #form .branch-field, #form .validation-field, #form .captcha, #form .send { grid-column: 1 / -1; }
#form .course-interest table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
#form .course-interest td { padding: 13px 14px; border: 1px solid #dfd2c8; border-radius: 8px; background: #fff; }
#form .course-interest input { margin: 4px 9px 0 0; vertical-align: top; accent-color: #c96442; }
#form .course-interest label { display: inline-block; width: calc(100% - 30px); margin: 0; vertical-align: top; font-weight: 600; line-height: 1.55; cursor: pointer; }
#form .course-interest label::after { display: block; color: #776860; font-weight: 400; }
#form .course-interest tr:nth-child(1) label::after { content: "建立 AI 工具地圖，知道該學什麼。"; }
#form .course-interest tr:nth-child(2) label::after { content: "建立完整 AI 開發 Workflow。"; }
#form .course-interest tr:nth-child(3) label::after { content: "打造企業可落地的 AI 開發流程。"; }
#form .branch-field table { width: auto; border: 0; }
#form .branch-field td { padding: 0 25px 0 0; white-space: nowrap; }
#form .branch-field input { margin-right: 5px; accent-color: #c96442; }
#form .branch-field label { display: inline; margin: 0; cursor: pointer; }
#form .captcha { text-align: center; }
#form .captcha img { max-width: 100%; height: auto; }
#form .send input[type="submit"] { width: 100%; min-height: 54px; border: 0; border-radius: 9px; background: #c96442; color: #fff; font-weight: 800; cursor: pointer; transition: background .2s ease, transform .2s ease; }
#form .send input[type="submit"]:hover { background: #9f472f; transform: translateY(-2px); }
#form .form-message { max-width: 700px; margin: 0 auto; padding: 36px; border-radius: 16px; background: #f7f2ec; text-align: center; }
#form .success-modal { position: fixed; z-index: 10000; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; }
#form .success-modal__backdrop { position: absolute; background: rgba(36, 32, 30, .58); cursor: pointer; inset: 0; }
#form .success-modal__dialog { position: relative; width: min(100%, 520px); padding: 54px 44px; border: 1px solid #dfd2c8; border-radius: 20px; background: #fffdf9; box-shadow: 0 24px 70px rgba(36, 32, 30, .26); text-align: center; }
#form .success-modal__dialog p { margin: 0; color: #342b27; font-weight: 800; line-height: 1.5; }
#form .success-modal__close { position: absolute; top: 12px; right: 14px; display: flex; width: 38px; height: 38px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #776860; line-height: 1; cursor: pointer; transition: color .2s ease, background .2s ease; }
#form .success-modal__close:hover, #form .success-modal__close:focus-visible { background: #f7f2ec; color: #c96442; outline: none; }
#form .success-modal.is-closing { display: none; }

@media (max-width: 767.98px) {
    #form.consult { padding: 74px 18px; }
    #form .Form { padding: 34px 22px; }
    #form .form-grid { grid-template-columns: 1fr; }
    #form .form-grid > li { grid-column: 1; }
    #form .branch-field table, #form .branch-field tbody, #form .branch-field tr { display: block; }
    #form .branch-field td { display: inline-block; padding: 3px 18px 3px 0; }
    #form .success-modal__dialog { padding: 50px 24px 42px; }
}
