/* Loaded only in the isolated form document. */

:root {
  --navy: #431010;
  --blue: #ce0d0d;
  --blue-dark: #aa0a0a;
  --pale: #ffdada;
  --line: #ead7d7;
  --ink: #3c2020;
  --muted: #816464;
  --danger: #b42318;
  --white: #fff;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { display: flow-root; margin: 0; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Yu Gothic", "Hiragino Kaku Gothic ProN", "Segoe UI", sans-serif; line-height: 1.7; }
a { color: var(--blue); }
.apply-shell { width: min(960px, calc(100% - 32px)); margin: 42px auto 72px; }
.apply-card { padding: clamp(24px, 5vw, 52px); background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 40px rgba(67, 16, 16, 0.08); }
.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0 0 12px; color: var(--navy); font-size: clamp(1.7rem, 4vw, 2.45rem); line-height: 1.3; }
.lead { margin: 0 0 28px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 38px; padding: 0; list-style: none; }
.steps li { position: relative; padding-top: 12px; border-top: 4px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 700; }
.steps li.is-current, .steps li.is-done { border-color: var(--blue); color: var(--blue-dark); }
.steps button { display: block; width: 100%; padding: 4px 6px; border: 0; border-radius: 6px; color: inherit; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.steps button:hover { background: var(--pale); color: var(--blue-dark); }
.steps button:focus-visible { outline: 3px solid rgba(170, 23, 23, 0.22); outline-offset: 2px; }
.form-section { margin-top: 34px; }
.form-section h2 { margin: 0 0 18px; padding-bottom: 9px; color: var(--navy); border-bottom: 2px solid var(--pale); font-size: 1.22rem; }
.field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.field { grid-column: span 2; min-width: 0; margin: 0; padding: 0; border: 0; }
.field--wide { grid-column: 1 / -1; }
.field--half { grid-column: span 1; }
.form-break { grid-column: 1 / -1; height: 0; }
.form-divider { grid-column: 1 / -1; height: 1px; margin: 8px 0; background: var(--line); }
.field label, .field legend { display: block; margin-bottom: 7px; color: var(--navy); font-size: .92rem; font-weight: 700; }
.field label > .wpcf7-form-control-wrap { display: block; margin-top: 7px; }
.postcode-lookup-status { display: block; margin-top: 6px; color: #356a3b; }
.postcode-lookup-status.is-error { color: #b42318; }
.draft-storage-notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; padding: 12px 14px; border: 1px solid #ebc9c9; border-radius: 8px; background: #fdf4f4; color: #5f2929; font-size: .88rem; }
.draft-clear-button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #bd8b8b; border-radius: 6px; background: #fff; color: #5f2929; cursor: pointer; }
.field-help { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; font-weight: 500; }
.householder-notice { margin: 10px 0 0; padding: 14px 16px; border-left: 4px solid var(--danger); background: #fff5f3; color: var(--danger); font-size: .88rem; font-weight: 700; }
.field[hidden] { display: none !important; }
.field.is-condition-disabled { opacity: .42; }
.field.is-condition-disabled input,
.field.is-condition-disabled select,
.field.is-condition-disabled textarea { cursor: not-allowed; background: #f4eeee; }
.required { margin-left: 7px; padding: 2px 6px; color: var(--danger); background: #fff0ee; border-radius: 4px; font-size: .68rem; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #caaeae; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(170, 23, 23, 0.16); border-color: var(--blue); }
.choice-list { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.choice-list label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-weight: 500; }
.choice-list input { width: auto; min-height: auto; }
.field .wpcf7-list-item { margin: 0 18px 8px 0; }
.field .wpcf7-list-item label { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-weight: 500; }
.field .wpcf7-list-item input { width: auto; min-height: auto; }
.aiyoshin-optional-radio input[type="checkbox"] { appearance: none; width: 18px; height: 18px; margin: 0; border: 2px solid #a38282; border-radius: 50%; background: #fff; }
.aiyoshin-optional-radio input[type="checkbox"]:checked { border: 5px solid var(--blue); }
.aiyoshin-optional-radio input[type="checkbox"]:focus-visible { outline: 3px solid rgba(170, 23, 23, 0.2); outline-offset: 2px; }
.form-actions { display: flex; justify-content: space-between; gap: 16px; margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.form-actions > p { display: flex; justify-content: flex-start; align-items: center; gap: 16px; width: 100%; margin: 0; }
.form-actions > p:empty { display: none; }
.form-actions .button { flex: 0 0 auto; width: auto; }
.aiyoshin-wizard .wizard-panel:nth-child(2) .form-actions > p > .button:last-of-type { margin-right: auto; }
.form-actions .button--back { order: 1; }
.form-actions .wpcf7-spinner { order: 2; flex: 0 0 24px; margin: 0 0 0 auto; }
.form-actions > p > .button.wpcf7-submit { order: 3; margin-left: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; min-width: 150px; min-height: 50px; padding: 10px 22px; border: 0; border-radius: 8px; color: #fff; background: var(--blue); font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover { background: var(--blue-dark); }
.button--back { color: var(--navy); background: #f3e8e8; }
.button--back:hover { background: #eddbdb; }
.notice { margin: 0 0 24px; padding: 14px 18px; border-left: 4px solid var(--danger); background: #fff5f3; color: #7a271a; }
.wizard-panel[hidden] { display: none !important; }
.wpcf7 form .wpcf7-response-output { margin: 24px 0 0; padding: 12px 16px; border-radius: 8px; }
.wpcf7-not-valid-tip { margin-top: 5px; font-size: .82rem; }
.wpcf7-spinner { align-self: center; }
.thanks { text-align: center; padding: 36px 0 18px; }
.thanks-mark { display: grid; width: 72px; height: 72px; margin: 0 auto 22px; place-items: center; border-radius: 50%; color: #fff; background: #138a5b; font-size: 2rem; }

/* CF7 feedback and accessibility, without loading another stylesheet. */
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden], .wpcf7 .hidden-fields-container { display: none !important; }
.wpcf7-list-item { display: inline-block; }
.wpcf7-form-control-wrap { position: relative; }
.wpcf7-not-valid-tip { display: block; color: var(--danger); font-weight: 400; }
.wpcf7-response-output { border: 2px solid var(--danger); }
.wpcf7 form.sent .wpcf7-response-output { border-color: #138a5b; }
.wpcf7 form.init .wpcf7-response-output,
.wpcf7 form.resetting .wpcf7-response-output,
.wpcf7 form.submitting .wpcf7-response-output { display: none; }
.wpcf7-spinner { display: inline-block; visibility: hidden; width: 24px; height: 24px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; }
.wpcf7 form.submitting .wpcf7-spinner { visibility: visible; animation: gafs-spin 1s linear infinite; }
.wpcf7 [inert], .wpcf7-submit:disabled { opacity: .5; }
@keyframes gafs-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wpcf7 form.submitting .wpcf7-spinner { animation: none; } }

@media (max-width: 700px) {
  .apply-shell { margin-top: 20px; }
  .apply-card { padding: 22px 18px; }
  .draft-storage-notice { align-items: stretch; flex-direction: column; }
  .draft-clear-button { width: 100%; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .field { grid-column: span 2; }
  .field--wide { grid-column: 1 / -1; }
  .field--half { grid-column: span 1; }
  .steps li span { display: none; }
  .form-actions { flex-direction: column-reverse; }
  /* .form-actions > p { align-items: stretch; } */
  .aiyoshin-wizard .wizard-panel:nth-child(3) .form-actions > p { flex-direction: column-reverse; }
  .form-actions .wpcf7-spinner { order: 3; }
  .form-actions .button { flex: 1 1 0; width: 100%; min-width: 0; }
  .button { width: 100%; }
}
.applicant-name-note {
  margin-top: -12px;
}
.privacy-consent-intro p { margin: 0 0 8px; }
.gafs-error-summary { margin: 0 0 24px; padding: 16px; border: 2px solid var(--danger); border-radius: 8px; color: var(--danger); }
.gafs-error-summary[hidden] { display: none; }
.gafs-error-summary p { margin: 0 0 8px; font-weight: 700; }
.gafs-error-summary ul { margin: 0; padding-left: 20px; }
.gafs-error-summary button { padding: 4px 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; text-decoration: underline; cursor: pointer; }
.gafs-invalid-field { outline: 2px solid var(--danger); outline-offset: 4px; }
.gafs-field-error { display: block; margin-top: 8px; color: var(--danger); }
.privacy-consent-intro a { font-weight: 700; text-decoration: underline; }
[data-field="privacy_consent"] input:disabled + .wpcf7-list-item-label { cursor: not-allowed; opacity: .6; }
