.affirm-portal-shell {
  width: min(calc(100% - 40px), 1180px);
  margin: 0 auto;
  padding: clamp(72px, 9vw, 120px) 0;
}
.affirm-portal-shell--narrow { max-width: 760px; }
.affirm-portal-intro { max-width: 820px; margin-bottom: 42px; }
.affirm-portal-intro h1 { max-width: 780px; }
.affirm-portal-intro p { max-width: 720px; color: var(--affirm-muted, #686a67); font-size: 1.08rem; }
.affirm-portal-card,
.affirm-portal-form,
.affirm-portal-summary-card,
.affirm-portal-choice {
  background: #fff;
  border: 1px solid rgba(8,8,8,.13);
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(8,8,8,.08);
}
.affirm-portal-card { padding: clamp(28px, 5vw, 52px); }
.affirm-portal-form { position: relative; padding: clamp(26px, 5vw, 54px); }
.affirm-portal-honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.affirm-portal-notice { margin: 0 0 24px; padding: 15px 18px; border-radius: 10px; border-left: 4px solid; }
.affirm-portal-notice--error { color: #792430; background: #fae5e8; border-color: #b43a4c; }
.affirm-portal-notice--success { color: #0f594d; background: #dff6ef; border-color: #199b82; }
.affirm-portal-notice--warning { color: #725216; background: #fff4d8; border-color: #827c72; }
.affirm-portal-notice--info { color: #596568; background: #f6f3ee; border-color: #667679; }
.affirm-portal-section-title { display: grid; grid-template-columns: 52px 1fr; gap: 17px; align-items: start; margin: 0 0 25px; }
.affirm-portal-section-title:not(:first-of-type) { margin-top: 48px; padding-top: 40px; border-top: 1px solid rgba(8,8,8,.12); }
.affirm-portal-section-title > span { width: 48px; height: 48px; display: grid; place-items: center; color: #fff; background: #242625; border-radius: 50%; font-size: .78rem; font-weight: 800; }
.affirm-portal-section-title h2 { margin-bottom: 5px; font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
.affirm-portal-section-title p { margin: 0; color: #686a67; font-size: .9rem; }
.affirm-portal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px; }
.affirm-portal-field { display: grid; gap: 8px; }
.affirm-portal-field--wide { grid-column: 1 / -1; }
.affirm-portal-field > span { color: #262827; font-size: .82rem; font-weight: 750; }
.affirm-portal-field input,
.affirm-portal-field select,
.affirm-portal-field textarea,
.affirm-portal-login-card input[type="text"],
.affirm-portal-login-card input[type="password"] {
  width: 100%; min-height: 52px; padding: 12px 14px;
  color: #262827; background: #fff;
  border: 1px solid rgba(8,8,8,.20); border-radius: 10px;
  outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.affirm-portal-field input:focus,
.affirm-portal-login-card input:focus { border-color: #667679; box-shadow: 0 0 0 3px rgba(102,118,121,.14); }
.affirm-portal-consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; margin-top: 34px; color: #686a67; font-size: .86rem; }
.affirm-portal-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: #667679; }
.affirm-portal-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 34px; }
.affirm-portal-form-actions p { margin: 0; font-size: .9rem; }
.affirm-portal-login-card { max-width: 620px; margin-inline: auto; }
.affirm-portal-login-card .login-username,
.affirm-portal-login-card .login-password { display: grid; gap: 8px; }
.affirm-portal-login-card label { color: #262827; font-size: .84rem; font-weight: 750; }
.affirm-portal-login-card .login-remember label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
.affirm-portal-login-card .button-primary {
  width: 100%; min-height: 52px; border: 0; border-radius: 999px;
  color: #fff; background: #171817; font-weight: 750; cursor: pointer;
}
.affirm-portal-login-card .button-primary:hover { background: #667679; }
.affirm-portal-login-links { display: flex; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(8,8,8,.12); font-size: .88rem; }
.affirm-portal-success-panel { max-width: 720px; text-align: center; }
.affirm-portal-status-icon { width: 68px; height: 68px; display: grid; place-items: center; margin: 0 auto 24px; color: #fff; background: #667679; border-radius: 50%; font-size: 1.8rem; font-weight: 900; }
.affirm-portal-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; }
.affirm-portal-choice { display: block; padding: 34px; color: #262827; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.affirm-portal-choice:hover { color: #262827; border-color: #667679; transform: translateY(-4px); }
.affirm-portal-choice > span { display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 25px; color: #fff; background: #242625; border-radius: 50%; font-size: .76rem; font-weight: 800; }
.affirm-portal-choice h2 { font-size: 1.5rem; }
.affirm-portal-choice p { margin: 0; color: #686a67; }
.affirm-portal-dashboard-head { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 34px; }
.affirm-portal-dashboard-head p { color: #686a67; }
.affirm-portal-account-actions { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.affirm-portal-status { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 12px; border-radius: 999px; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.affirm-portal-status--approved { color: #0f594d; background: #dff6ef; }
.affirm-portal-status--pending { color: #725216; background: #fff4d8; }
.affirm-portal-status--suspended { color: #792430; background: #fae5e8; }
.affirm-portal-dashboard-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.affirm-portal-summary-card { position: sticky; top: 150px; padding: 28px; }
.affirm-portal-summary-card__label { display: block; margin: 20px 0 4px; color: #686a67; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.affirm-portal-summary-card__label:first-child { margin-top: 0; }
.affirm-portal-summary-card strong { display: block; color: #171817; overflow-wrap: anywhere; }
.affirm-portal-summary-card a { overflow-wrap: anywhere; font-size: .88rem; }
.affirm-portal-summary-rule { height: 1px; margin: 24px 0; background: rgba(8,8,8,.12); }
.affirm-portal-profile-form { padding: 36px; }
@media (max-width: 820px) {
  .affirm-portal-dashboard-grid { grid-template-columns: 1fr; }
  .affirm-portal-summary-card { position: static; }
  .affirm-portal-dashboard-head { align-items: start; flex-direction: column; }
}
@media (max-width: 680px) {
  .affirm-portal-shell { width: min(calc(100% - 30px), 1180px); }
  .affirm-portal-form-grid,
  .affirm-portal-choice-grid { grid-template-columns: 1fr; }
  .affirm-portal-field--wide { grid-column: auto; }
  .affirm-portal-form-actions,
  .affirm-portal-login-links { align-items: stretch; flex-direction: column; }
  .affirm-portal-form-actions .affirm-button { width: 100%; }
  .affirm-portal-section-title { grid-template-columns: 44px 1fr; }
  .affirm-portal-section-title > span { width: 42px; height: 42px; }
  .affirm-portal-profile-form { padding: 25px 20px; }
}

/* v1.2 neutral palette */
.affirm-portal-login-card input:focus,.affirm-portal-field input:focus,.affirm-portal-field textarea:focus,.affirm-portal-field select:focus{border-color:#667679;box-shadow:0 0 0 3px rgba(102,118,121,.14)}
.affirm-portal-login-card .button-primary:hover{background:#667679}
.affirm-portal-status-icon{background:#667679}
.affirm-portal-choice:hover{border-color:#667679}
.affirm-portal-consent input{accent-color:#667679}
