.aa-ef { --aa-ef-error: #ff8a8a; border-bottom: 1px solid var(--color-border); }
.aa-ef__row { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 64px; align-items: start; }

/* ── Side column (same as aa_form_embed) ────────────────────────────── */
.aa-ef__side { position: sticky; top: calc(var(--fg-nav-h, 88px) + 32px); }
.aa-ef__title { font-size: clamp(24px, 2.4vw, 32px); font-weight: 350; line-height: 1.1; letter-spacing: -.03em; color: var(--color-fg); margin-bottom: 24px; }
.aa-ef__list { list-style: none; border-top: 1px solid var(--color-border); }
.aa-ef__list li { padding: 14px 0 14px 26px; border-bottom: 1px solid var(--color-border); position: relative; }
.aa-ef__list li:not(.aa-ef__add)::before { content: ""; position: absolute; left: 2px; top: 20px; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); box-shadow: 0 0 10px var(--color-accent-glow); }
.aa-ef__list strong { display: block; font-size: 14px; font-weight: 500; color: var(--color-fg); }
.aa-ef__list span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.6; color: var(--color-muted); }
.aa-ef__facts { margin-top: 28px; display: grid; gap: 1px; background: var(--color-border); border: 1px solid var(--color-border); }
.aa-ef__facts > div:not(.aa-ef__add) { background: var(--color-surface); padding: 14px 16px; }
.aa-ef__facts dt { font: 10px var(--font-mono); text-transform: uppercase; letter-spacing: 1px; color: var(--color-accent); }
.aa-ef__facts dd { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--color-fg-muted); }
.aa-ef__facts dd strong { color: var(--color-fg); font-weight: 500; }
.aa-ef__add { padding: 0 !important; border: 0 !important; background: none !important; }
.aa-ef__add::before { content: none !important; }

/* ── Form ───────────────────────────────────────────────────────────── */
.aa-ef__intro { margin-bottom: 28px; font-size: 14px; line-height: 1.7; color: var(--color-fg-muted); }
.aa-ef__intro:empty { display: none; }
.aa-ef__form [hidden], .aa-ef [hidden] { display: none !important; }
.aa-ef__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.aa-ef__progress { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 0 0 36px; padding: 0; }
.aa-ef__progress li { cursor: pointer; border-top: 2px solid var(--color-border); padding-top: 10px; display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.aa-ef__progress li span { font: 11px var(--font-mono); color: var(--color-dim); }
.aa-ef__progress li em { font-style: normal; font-size: 12px; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-ef__progress li.is-done { border-color: var(--color-accent-deep); }
.aa-ef__progress li.is-current { border-color: var(--color-accent); }
.aa-ef__progress li.is-current span, .aa-ef__progress li.is-current em { color: var(--color-fg); }

.aa-ef__step { border: 0; margin: 0; padding: 0; min-width: 0; }
.aa-ef__step-title { display: block; width: 100%; padding: 0 0 18px; margin-bottom: 8px; border-bottom: 1px solid var(--color-border);
  font-size: 30px; font-weight: 300; letter-spacing: -.03em; line-height: 1.1; color: var(--color-fg); }
.aa-ef__step-title span { display: block; margin-top: 8px; font-size: 14px; letter-spacing: 0; color: var(--color-muted); }
.aa-ef__lead { margin: 14px 0 4px; font-size: 14px; line-height: 1.7; color: var(--color-fg-muted); }

.aa-ef__grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.aa-ef__field { padding: 14px 0; margin: 0; border: 0; min-width: 0; }
.aa-ef__label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--color-fg); padding: 0; }
.aa-ef__zh { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--color-muted); }
.aa-ef__req { color: var(--color-accent); }
.aa-ef__help { margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--color-muted); }
.aa-ef__help a, .aa-ef__check a { color: var(--color-accent); text-decoration: none; }
.aa-ef__count { margin-top: 4px; font: 11px var(--font-mono); color: var(--color-dim); text-align: right; }
.aa-ef__count.is-over { color: var(--aa-ef-error); }

.aa-ef input[type=text], .aa-ef input[type=email], .aa-ef input[type=tel], .aa-ef input[type=url], .aa-ef select, .aa-ef textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px; font: 15px/1.4 var(--font-body);
  color: var(--color-fg); background-color: var(--color-surface); border: 1px solid var(--color-border); border-radius: 2px;
  transition: border-color .2s, box-shadow .2s; color-scheme: dark;
}
.aa-ef textarea { min-height: 120px; line-height: 1.6; resize: vertical; }
.aa-ef select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2355C8FF' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
.aa-ef input::placeholder, .aa-ef textarea::placeholder { color: var(--color-dim); }
.aa-ef input:hover, .aa-ef select:hover, .aa-ef textarea:hover { border-color: rgba(204, 220, 242, .4); }
.aa-ef input:focus, .aa-ef select:focus, .aa-ef textarea:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(85, 200, 255, .15); }

.aa-ef__options { display: grid; gap: 8px; }
.aa-ef__option { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; line-height: 1.5; color: var(--color-fg-muted); }
.aa-ef__option input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin-top: 1px;
  border: 1px solid rgba(204, 220, 242, .35); background: var(--color-surface); border-radius: 2px; display: grid; place-content: center; cursor: pointer; }
.aa-ef__option input[type=radio] { border-radius: 50%; }
.aa-ef__option input:checked { border-color: var(--color-accent); background: var(--color-accent); }
.aa-ef__option input[type=radio]:checked { background: var(--color-surface); }
.aa-ef__option input[type=radio]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-accent); }
.aa-ef__option input[type=checkbox]:checked::after { content: ""; width: 5px; height: 9px; margin-top: -2px; border: solid var(--color-bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.aa-ef__option input:focus-visible { box-shadow: 0 0 0 3px rgba(85, 200, 255, .25); }
.aa-ef__check .aa-ef__option { color: var(--color-fg); }

.aa-ef__notice { margin: 6px 0; padding: 4px 0 4px 16px; border-left: 2px solid var(--color-accent); font-size: 14px; line-height: 1.7; color: var(--color-fg-muted); }
.aa-ef__notice .aa-ef__zh { margin-top: 8px; }

.aa-ef__error { margin-top: 6px; font-size: 13px; color: var(--aa-ef-error); }
.aa-ef__error:empty { display: none; }
.aa-ef__field.is-error input, .aa-ef__field.is-error select, .aa-ef__field.is-error textarea, .aa-ef__field.is-error .aa-ef__drop { border-color: var(--aa-ef-error); }

/* Files */
.aa-ef__drop { display: block; padding: 22px 20px; border: 1px dashed rgba(85, 200, 255, .35); background: var(--color-surface); border-radius: 2px; cursor: pointer; transition: border-color .2s, background .2s; }
.aa-ef__drop:hover, .aa-ef__drop.is-over { border-color: var(--color-accent); background: var(--color-surface-2); }
.aa-ef__drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.aa-ef__drop strong { display: inline-block; padding: 9px 18px; border: 1px solid rgba(230, 240, 255, .48); border-radius: 4px; font-size: 13px; font-weight: 400; color: var(--color-fg); }
.aa-ef__drop span { display: block; margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--color-muted); }
.aa-ef__files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.aa-ef__files li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--color-surface); border: 1px solid var(--color-border); font-size: 13px; }
.aa-ef__files li.is-bad { border-color: var(--aa-ef-error); }
.aa-ef__files img { width: 44px; height: 44px; object-fit: cover; flex: none; }
.aa-ef__files .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-fg); }
.aa-ef__files .s { font: 11px var(--font-mono); color: var(--color-dim); white-space: nowrap; }
.aa-ef__files li.is-bad .s { color: var(--aa-ef-error); }
.aa-ef__files button { flex: none; width: 28px; height: 28px; border: 1px solid var(--color-border); background: none; color: var(--color-fg-muted); border-radius: 2px; cursor: pointer; font-size: 14px; }
.aa-ef__files button:hover { border-color: var(--color-accent); color: var(--color-fg); }

.aa-ef__fee { margin-top: 18px; padding: 18px 20px; background: var(--color-accent-deep); color: var(--color-on-dark); font-size: 15px; line-height: 1.6; }
.aa-ef__fee strong { font-weight: 600; }
.aa-ef__fee .aa-ef__zh { color: var(--color-accent-soft); }

/* Buttons */
.aa-ef__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--color-border); }
.aa-ef__stepinfo { font: 11px var(--font-mono); color: var(--color-dim); margin-right: auto; }
.aa-ef__btn[data-back] + .aa-ef__stepinfo { margin-left: 8px; }
.aa-ef__btn { min-height: 46px; padding: 0 26px; border-radius: 4px; border: 1px solid var(--color-accent); background: var(--color-accent);
  color: var(--color-bg); font: 600 13px var(--font-body); cursor: pointer; transition: background .2s, border-color .2s; }
.aa-ef__btn:hover { background: var(--color-accent-soft); border-color: var(--color-accent-soft); }
.aa-ef__btn--ghost { background: transparent; color: var(--color-fg); font-weight: 400; border-color: rgba(230, 240, 255, .48); }
.aa-ef__btn--ghost:hover { background: transparent; border-color: var(--color-accent); }
.aa-ef__btn:disabled { opacity: .5; cursor: wait; }
.aa-ef__btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.aa-ef__sending { margin-top: 18px; font-size: 14px; color: var(--color-fg-muted); }
.aa-ef__bar { height: 3px; margin-top: 10px; background: var(--color-border); }
.aa-ef__bar i { display: block; height: 100%; width: 0; background: var(--color-accent); box-shadow: 0 0 10px var(--color-accent-glow); transition: width .2s; }
.aa-ef__formerror { margin-top: 14px; font-size: 14px; color: var(--aa-ef-error); }
.aa-ef__formerror:empty { display: none; }

/* Thank-you and closed states — the message in the accent blue. */
.aa-ef__thanks, .aa-ef__closed { padding: 40px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-accent); outline: none; }
.aa-ef__thanks h3 { font-size: 30px; font-weight: 300; letter-spacing: -.03em; line-height: 1.15; color: var(--color-accent); }
.aa-ef__thanks-text { margin-top: 16px; font-size: 15px; line-height: 1.75; color: var(--color-accent); }
.aa-ef__thanks-text p + p { margin-top: 12px; }
.aa-ef__closed { font-size: 16px; line-height: 1.7; }
.aa-ef__closed a, .aa-ef__thanks a { color: var(--color-fg); }

/* In the editor the form is shown but inert; the side column and texts are editable. */
body.cms-edit .aa-ef__thanks[hidden] { display: block !important; margin-top: 24px; }
body.cms-edit .aa-ef__thanks[hidden]::before { content: "Shown after submitting ({id} and {email} are filled in):"; display: block; margin-bottom: 12px; font: 11px var(--font-mono); color: var(--color-dim); }

@media (max-width: 900px) {
  .aa-ef__row { grid-template-columns: 1fr; gap: 40px; }
  .aa-ef__side { position: static; }
}
@media (max-width: 640px) {
  .aa-ef__grid { grid-template-columns: 1fr; }
  .aa-ef__progress em { display: none; }
  .aa-ef__thanks, .aa-ef__closed { padding: 28px 22px; }
}
