.partner-apply-page { min-height: 100vh; }
.partner-apply-page [hidden] { display: none !important; }
.partner-apply-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 62px 0 28px; }
.apply-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; }
.apply-heading > div:first-child { max-width: 790px; }
.apply-back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 34px; color: var(--muted); font-size: 14px; font-weight: 620; }
.apply-back-link:hover { color: var(--accent); }
.apply-heading .eyebrow { margin: 0; }
.apply-heading h1 { margin: 12px 0 0; font-size: clamp(42px, 6vw, 68px); line-height: 1; letter-spacing: -0.055em; }
.apply-heading > div:first-child > p:last-child { max-width: 720px; margin: 20px 0 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.draft-state { display: flex; align-items: center; gap: 9px; max-width: 290px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--partner-panel) 92%, transparent); color: var(--muted); font-size: 13px; line-height: 1.4; }
.draft-state > span:first-child { display: grid; flex: 0 0 auto; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(38, 181, 116, 0.12); color: #168754; font-weight: 800; }
:root[data-theme="dark"] .draft-state > span:first-child { color: #71dfa9; }

.apply-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; margin: 42px 0 26px; padding: 0; border: 1px solid var(--line); border-radius: 22px; background: color-mix(in srgb, var(--partner-panel) 92%, transparent); list-style: none; }
.apply-progress li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 2px 14px; min-height: 88px; padding: 18px 24px; color: var(--muted); }
.apply-progress li + li { border-left: 1px solid var(--partner-hairline); }
.apply-progress li > span { grid-row: 1 / 3; display: grid; place-items: center; width: 42px; height: 42px; align-self: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 13px; font-weight: 760; }
.apply-progress strong { align-self: end; color: inherit; font-size: 15px; }
.apply-progress small { align-self: start; font-size: 12px; }
.apply-progress li.is-active { background: color-mix(in srgb, var(--surface) 76%, var(--accent) 24%); color: var(--text); }
.apply-progress li.is-active > span { border-color: transparent; background: var(--accent); color: #fff; box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 12%, transparent); }
.apply-progress li.is-complete > span { border-color: color-mix(in srgb, #27a970 36%, var(--line)); background: rgba(38, 181, 116, 0.12); color: #168754; }
:root[data-theme="dark"] .apply-progress li.is-complete > span { color: #71dfa9; }

.apply-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 24px; }
.application-form, .apply-aside, .application-success { border: 1px solid var(--line); background: color-mix(in srgb, var(--partner-panel) 94%, transparent); }
.application-form { overflow: hidden; border-radius: 28px; box-shadow: 0 26px 80px rgba(46, 22, 91, 0.08); }
.application-basics { padding: clamp(28px, 5vw, 48px); }
.form-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--partner-hairline); }
.form-section-heading .eyebrow { margin: 0; }
.form-section-heading h2 { margin: 9px 0 0; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.035em; }
.required-badge, .optional-badge { flex: 0 0 auto; padding: 7px 11px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
.form-field label small, .choice-group legend small, .platforms-fieldset legend small { margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 560; }
.form-step { padding: clamp(28px, 5vw, 48px); }
.form-step-heading { margin-bottom: 34px; padding-bottom: 26px; border-bottom: 1px solid var(--partner-hairline); }
.form-step-heading > span { color: var(--accent); font-size: 12px; font-weight: 760; letter-spacing: 0.07em; text-transform: uppercase; }
.form-step-heading h2 { margin: 10px 0 0; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.035em; }
.form-step-heading h2:focus { outline: none; }
.form-step-heading p { margin: 9px 0 0; color: var(--muted); line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.form-field { min-width: 0; }
.form-field-wide { grid-column: 1 / -1; }
.form-field label, .choice-group legend, .platforms-fieldset legend, .consents-fieldset legend { display: block; margin-bottom: 9px; color: var(--text); font-size: 14px; font-weight: 650; }
.form-field label > span, .choice-group legend > span, .platforms-fieldset legend > span { color: var(--accent); }
.form-field input, .form-field select, .form-field textarea { display: block; width: 100%; border: 1px solid var(--line); border-radius: 14px; outline: none; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text); font: inherit; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.form-field input, .form-field select { min-height: 52px; padding: 0 15px; }
.form-field textarea { min-height: 132px; padding: 15px; resize: vertical; line-height: 1.55; }
.form-field input::placeholder, .form-field textarea::placeholder { color: color-mix(in srgb, var(--muted) 68%, transparent); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: color-mix(in srgb, var(--accent) 68%, var(--line)); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 11%, transparent); }
.field-hint, .contact-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.contact-hint { margin-top: -12px; }
.field-error { min-height: 0; margin: 7px 0 0; color: #c63851; font-size: 12px; font-weight: 570; }
.field-error:empty { display: none; }
:root[data-theme="dark"] .field-error { color: #ff8fa2; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea, .platform-row.has-error input, .platform-row.has-error select { border-color: #d64a61; box-shadow: 0 0 0 3px rgba(214, 74, 97, 0.08); }

.choice-group, .platforms-fieldset, .consents-fieldset { min-width: 0; margin: 30px 0 0; padding: 0; border: 0; }
.choice-grid { display: grid; gap: 12px; }
.applicant-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-formats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.choice-card, .check-card { display: flex; align-items: center; gap: 13px; min-height: 68px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--surface) 86%, transparent); cursor: pointer; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.check-card { min-height: 54px; }
.choice-card:hover, .check-card:hover { border-color: color-mix(in srgb, var(--accent) 42%, var(--line)); transform: translateY(-1px); }
.choice-card:has(input:checked), .check-card:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 64%, var(--line)); background: color-mix(in srgb, var(--surface) 78%, var(--accent) 22%); }
.choice-card input, .check-card input, .consent-row input { flex: 0 0 auto; width: 19px; height: 19px; margin: 0; accent-color: var(--accent); }
.choice-card strong, .choice-card small { display: block; }
.choice-card strong { font-size: 14px; }
.choice-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.check-card span { font-size: 13px; font-weight: 620; }

.platform-list { display: grid; gap: 12px; margin-top: 14px; }
.platform-row { display: grid; grid-template-columns: minmax(150px, 0.38fr) minmax(220px, 1fr) 42px; align-items: end; gap: 12px; }
.remove-platform { display: grid; place-items: center; width: 42px; height: 52px; border: 1px solid var(--line); border-radius: 13px; background: transparent; color: var(--muted); cursor: pointer; font-size: 22px; }
.remove-platform:hover { border-color: rgba(198, 56, 81, 0.36); color: #c63851; }
.remove-platform:disabled { visibility: hidden; }
.secondary-action { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; margin-top: 14px; padding: 0 15px; border: 1px solid var(--line); border-radius: 13px; background: transparent; color: var(--accent); cursor: pointer; font-weight: 650; }
.secondary-action:hover { background: var(--accent-soft); }
.audience-fields { margin-top: 30px; }
.field-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.field-meta > span { margin-top: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.form-step[data-form-step="3"] > .form-field + .form-field { margin-top: 24px; }

.consents-fieldset { display: grid; gap: 11px; margin-top: 30px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface) 82%, transparent); }
.consents-fieldset legend { float: left; width: 100%; margin-bottom: 5px; }
.consent-row { display: flex; align-items: flex-start; gap: 12px; color: var(--muted); font-size: 13px; line-height: 1.48; }
.consent-row input { margin-top: 1px; }
.consent-row a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.primary-consent { margin-top: 28px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--surface) 84%, transparent); }
.optional-profile { border-top: 1px solid var(--partner-hairline); }
.optional-profile > summary { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 92px; padding: 18px clamp(28px, 5vw, 48px); cursor: pointer; list-style: none; }
.optional-profile > summary::-webkit-details-marker { display: none; }
.optional-profile > summary:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.optional-profile > summary strong, .optional-profile > summary small { display: block; }
.optional-profile > summary strong { font-size: 15px; }
.optional-profile > summary small { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 450; }
.optional-plus { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-size: 22px; transition: transform 160ms ease; }
.optional-profile[open] .optional-plus { transform: rotate(45deg); }
.optional-profile-body { padding: 28px clamp(28px, 5vw, 48px) 42px; border-top: 1px solid var(--partner-hairline); background: color-mix(in srgb, var(--surface) 55%, transparent); }
.optional-profile-body .platforms-fieldset { margin-top: 30px; }
.optional-textarea { margin-top: 24px; }
.form-alert { margin: 24px 24px 0; padding: 15px 18px; border: 1px solid rgba(198, 56, 81, 0.26); border-radius: 14px; background: rgba(198, 56, 81, 0.08); color: #a7253d; font-size: 13px; line-height: 1.5; }
:root[data-theme="dark"] .form-alert { color: #ff9bac; }
.form-actions { display: flex; align-items: center; gap: 12px; padding: 20px clamp(28px, 5vw, 48px); border-top: 1px solid var(--partner-hairline); background: color-mix(in srgb, var(--surface) 72%, transparent); }
.form-actions .button { min-width: 148px; min-height: 50px; border: 0; cursor: pointer; }
.form-actions .button-secondary { border: 1px solid var(--line); }
.cancel-application { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 620; }
.cancel-application:hover { color: var(--text); }
.submit-note { color: var(--muted); font-size: 12px; }
.submit-application { position: relative; }
.submit-application:disabled { cursor: wait; opacity: 0.72; transform: none; }
.submit-spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: apply-spin .7s linear infinite; }
.submit-application.is-loading .submit-spinner { display: inline-block; }
.submit-application.is-loading [data-submit-label] { display: none; }
@keyframes apply-spin { to { transform: rotate(360deg); } }

.apply-aside { position: sticky; top: 112px; overflow: hidden; border-radius: 24px; }
.aside-note, .aside-timeline { padding: 28px; }
.aside-timeline { border-top: 1px solid var(--partner-hairline); }
.aside-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line)); border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 760; }
.apply-aside h2 { margin: 18px 0 0; font-size: 18px; line-height: 1.35; }
.apply-aside p { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.52; }
.aside-timeline h2 { margin: 0; }
.aside-timeline ol { display: grid; gap: 22px; margin: 24px 0 0; padding: 0; list-style: none; }
.aside-timeline li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 13px; }
.aside-timeline li > span { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); font-size: 12px; font-weight: 760; }
.aside-timeline strong { font-size: 13px; }

.application-success { max-width: 780px; margin: 42px auto 80px; padding: clamp(38px, 7vw, 72px); border-radius: 30px; text-align: center; box-shadow: 0 28px 90px rgba(46, 22, 91, 0.11); }
.success-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 25px; border-radius: 50%; background: rgba(38, 181, 116, 0.14); color: #168754; font-size: 28px; font-weight: 800; }
:root[data-theme="dark"] .success-icon { color: #71dfa9; }
.application-success h1 { margin: 12px 0 0; font-size: clamp(36px, 6vw, 54px); letter-spacing: -0.045em; }
.application-success > p:not(.eyebrow) { max-width: 620px; margin: 20px auto 0; color: var(--muted); line-height: 1.62; }
.success-reference { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; margin-top: 26px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.success-reference span { color: var(--muted); font-size: 12px; }
.success-reference code { overflow: hidden; color: var(--text); font-family: inherit; font-size: 12px; font-weight: 680; text-overflow: ellipsis; }
.success-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.apply-footer { margin-top: 54px; }

@media (max-width: 960px) {
  .apply-layout { grid-template-columns: 1fr; }
  .apply-aside { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aside-timeline { border-top: 0; border-left: 1px solid var(--partner-hairline); }
}
@media (max-width: 760px) {
  .partner-apply-main { padding-top: 44px; }
  .apply-heading { align-items: flex-start; flex-direction: column; }
  .draft-state { max-width: none; }
  .apply-progress li { display: flex; align-items: center; justify-content: center; min-height: 62px; padding: 10px; }
  .apply-progress li > span { width: 36px; height: 36px; }
  .apply-progress strong, .apply-progress small { display: none; }
  .form-grid, .applicant-types, .content-formats { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
  .form-section-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .optional-profile > summary { grid-template-columns: 38px minmax(0, 1fr); }
  .optional-badge { grid-column: 2; justify-self: start; }
  .contact-hint { margin-top: 0; }
  .platform-row { grid-template-columns: 1fr 42px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
  .platform-row .form-field:first-child { grid-column: 1 / -1; }
  .platform-url-field { grid-column: 1; }
  .remove-platform { grid-column: 2; }
  .apply-aside { grid-template-columns: 1fr; }
  .aside-timeline { border-top: 1px solid var(--partner-hairline); border-left: 0; }
}
@media (max-width: 520px) {
  .partner-apply-main { width: min(100% - 24px, 1180px); }
  .apply-heading h1 { font-size: 40px; }
  .form-step { padding: 26px 20px; }
  .application-basics { padding: 26px 20px; }
  .optional-profile > summary { padding: 18px 20px; }
  .optional-profile-body { padding: 24px 20px 32px; }
  .form-actions { align-items: stretch; flex-direction: column; padding: 18px 20px; }
  .form-actions .button { width: 100%; }
  .cancel-application { margin: 6px auto 0; }
  .consents-fieldset { padding: 18px; }
  .success-reference { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .submit-spinner { animation-duration: 1.4s; } }
