/* =============================================================================
   Account access — magic-link entry, role selection, and the M0 dashboard.
   The visual idea is a studio access pass: quiet utility copy paired with one
   oversized, unmistakable role mark.
   ========================================================================== */

.aft-auth {
  min-height: 38rem;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, transparent 49.9%, var(--c-line) 50%, transparent 50.1%),
    var(--c-paper-2);
}

.aft-auth__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.78fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: center;
}

.aft-auth__copy h1 {
  max-width: 10ch;
  margin-block: var(--sp-4);
}

.aft-auth__copy .aft-lead { max-width: 34rem; }

.aft-auth__card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--c-white);
  border: var(--bw-thick) solid var(--c-ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-magenta);
}

.aft-auth__card::before {
  content: "→";
  position: absolute;
  top: -0.38em;
  right: 0.08em;
  font-size: clamp(7rem, 15vw, 12rem);
  font-weight: var(--fw-black);
  line-height: 1;
  color: var(--c-paper-3);
  pointer-events: none;
}

.aft-auth__card > * { position: relative; }
.aft-auth__card h2 { margin-bottom: var(--sp-3); }

.aft-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}

.aft-form .aft-btn { align-self: flex-start; }

.aft-auth-result {
  max-width: 48rem;
  padding: clamp(2rem, 6vw, 4.5rem);
  background: var(--c-white);
  border: var(--bw-thick) solid var(--c-ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lime);
}

.aft-auth-result h1 {
  margin-block: var(--sp-4);
  font-size: var(--fs-2xl);
}

.aft-auth-result .aft-btn { margin-top: var(--sp-6); }

.aft-signup__intro {
  max-width: 54rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.aft-signup__intro h1 {
  margin-block: var(--sp-4);
  font-size: var(--fs-2xl);
}

.aft-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: stretch;
}

.aft-role-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 31rem;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--c-white);
  border: var(--bw-thick) solid var(--c-ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-magenta);
}

.aft-role-card--provider { box-shadow: var(--shadow-lime); }

.aft-role-card::after {
  content: "A";
  position: absolute;
  right: -0.07em;
  bottom: -0.25em;
  font-size: clamp(10rem, 24vw, 19rem);
  font-weight: var(--fw-black);
  line-height: 1;
  color: var(--c-magenta-soft);
  pointer-events: none;
}

.aft-role-card--provider::after {
  content: "P";
  color: var(--c-lime-soft);
}

.aft-role-card > * { position: relative; z-index: 1; }

.aft-role-card h2 {
  margin-block: var(--sp-3);
  font-size: var(--fs-2xl);
}

.aft-role-card > p:not(.aft-eyebrow) {
  max-width: 25rem;
  color: var(--text-muted);
}

.aft-role-card .aft-form {
  margin-top: auto;
  padding-top: var(--sp-6);
}

.aft-alert {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  background: var(--c-magenta-soft);
  border: var(--bw) solid var(--c-magenta);
  border-radius: var(--radius);
}

.aft-dashboard {
  min-height: 40rem;
  background: var(--c-paper-2);
}

.aft-dashboard__account {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding-bottom: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  border-bottom: var(--bw) solid var(--c-ink);
}

.aft-dashboard__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-6);
  align-items: center;
  padding-block: clamp(2.5rem, 7vw, 5.5rem);
}

.aft-dashboard__header h1 {
  margin-top: var(--sp-3);
  font-size: var(--fs-3xl);
}

.aft-dashboard__mark {
  display: grid;
  place-items: center;
  width: clamp(7rem, 15vw, 11rem);
  aspect-ratio: 1;
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: var(--fw-black);
  line-height: 1;
  background: var(--c-magenta);
  border: var(--bw-thick) solid var(--c-ink);
  border-radius: 50%;
  box-shadow: var(--shadow-ink);
  transform: rotate(-7deg);
}

.aft-dashboard__mark--provider {
  background: var(--c-lime);
  transform: rotate(7deg);
}

.aft-email-preferences {
  display: grid;
  gap: var(--sp-6);
  max-width: 62rem;
}

.aft-email-preferences__group {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.aft-email-preferences__heading,
.aft-email-preferences__row {
  padding: var(--sp-5);
}

.aft-email-preferences__heading {
  display: grid;
  gap: var(--sp-2);
}

.aft-email-preferences__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-5);
  align-items: center;
  border-top: var(--bw) solid var(--c-line);
}

.aft-email-preferences__row h3 {
  font-size: var(--fs-md);
}

.aft-email-preferences__row p {
  margin-top: var(--sp-2);
  color: var(--text-muted);
}

.aft-email-preferences__control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
}

.aft-email-preferences__control label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.aft-empty-state {
  display: grid;
  grid-template-columns: 0.6fr 1.3fr 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--c-white);
  border: var(--bw-thick) solid var(--c-ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lime);
}

.aft-empty-state h2 { font-size: var(--fs-xl); }
.aft-empty-state > p:last-child { color: var(--text-muted); }

.aft-dashboard-summary {
  display: grid;
  gap: var(--sp-6);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--c-white);
  border: var(--bw-thick) solid var(--c-ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lime);
}

.aft-dashboard-summary__progress {
  display: grid;
  gap: var(--sp-3);
}

.aft-dashboard-summary__missing {
  display: grid;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
  padding: 0;
  list-style: none;
}
/* An open ring per item: a to-do list, not a bulleted one. */
.aft-dashboard-summary__missing li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
}
.aft-dashboard-summary__missing li::before {
  content: "";
  flex: 0 0 auto;
  width: 0.7em;
  height: 0.7em;
  border: var(--bw) solid var(--c-magenta);
  border-radius: 50%;
  transform: translateY(0.05em);
}

.aft-dashboard-summary__sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-4);
}

/* An open Section uses the full summary width for the existing forms. */
.aft-dashboard-summary__sections > turbo-frame:has(> .aft-panel) {
  grid-column: 1 / -1;
}

.aft-dashboard-summary__sections > turbo-frame > .aft-card {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
}
.aft-dashboard-summary__sections h3 { font-size: var(--fs-md); }

/* Profile Review feedback sits above the summary: it is the one thing the
   Artist must act on, so it gets the magenta shadow the summary's lime
   one defers to. */
.aft-review-feedback {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--c-white);
  border: var(--bw-thick) solid var(--c-ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-magenta);
}
.aft-review-feedback h2 { font-size: var(--fs-lg); }

/* Explains the first Opportunity Review before an Art Seeker meets it.
   Informational, not a demand, so it takes the lime shadow rather than the
   magenta one reserved for feedback that needs action. */
.aft-review-intro {
  display: grid;
  gap: var(--sp-3);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--c-white);
  border: var(--bw-thick) solid var(--c-ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lime);
}
.aft-review-intro h2 { font-size: var(--fs-lg); }

.aft-review-feedback__note {
  display: grid;
  gap: var(--sp-3);
  margin: 0;
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-paper-2);
  border-left: 6px solid var(--c-magenta);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.aft-review-feedback__note blockquote {
  display: grid;
  gap: var(--sp-3);
  margin: 0;
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  overflow-wrap: anywhere;
}
.aft-review-feedback__note figcaption {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}
.aft-review-feedback__note figcaption::before { content: "— "; }

.aft-review-feedback__next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.aft-review-feedback__next p {
  flex: 1 1 20rem;
  color: var(--text-muted);
}

/* --- Profile setup chrome ----------------------------------------------- */
.aft-setup-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
}
.aft-setup-meta__score {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
}
.aft-setup-meta__score strong { color: var(--c-ink); }
.aft-setup-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
  padding-top: var(--sp-5);
  border-top: var(--bw) solid var(--c-ink);
}
.aft-setup-nav__forward {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  margin-left: auto;
}

@media (max-width: 52rem) {
  .aft-auth {
    background: var(--c-paper-2);
  }

  .aft-auth__grid,
  .aft-role-grid,
  .aft-empty-state {
    grid-template-columns: 1fr;
  }

  .aft-role-card { min-height: 28rem; }
  .aft-dashboard__mark { width: 6.5rem; }
}

@media (max-width: 34rem) {
  .aft-auth__grid { grid-template-columns: minmax(0, 1fr); }
  .aft-auth__card { padding: var(--sp-5); }
  .aft-form .aft-btn { width: 100%; }
  .aft-dashboard__header { grid-template-columns: 1fr; }
  .aft-dashboard__mark { grid-row: 1; width: 5rem; font-size: 3rem; }
  .aft-email-preferences__row { grid-template-columns: 1fr; }
  .aft-email-preferences__control { justify-content: flex-start; }
  /* Inline forms must shrink to the phone, not size the grid to their contents.
     Keep this local to the dashboard: standalone setup uses the same forms. */
  .aft-dashboard-summary,
  .aft-dashboard-summary__sections { grid-template-columns: minmax(0, 1fr); }
  /* On a phone the screen is already the frame: drop the summary's card so the
     Section cards and the open editor are the only boxes inside the gutter. */
  .aft-dashboard-summary {
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .aft-dashboard-summary__sections > turbo-frame { min-width: 0; }
  .aft-dashboard-summary__sections .aft-panel { padding: var(--sp-4); }
  .aft-dashboard-summary__sections .aft-field-grid,
  .aft-dashboard-summary__sections .aft-artwork-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .aft-dashboard-summary__sections .aft-artwork-row__details { min-width: 0; }
  .aft-dashboard-summary__sections input[type="file"] { max-width: 100%; }
  .aft-dashboard-summary__sections .aft-collapsible__title { flex-shrink: 1; }
}

/* Opportunity card actions are mostly text actions; without the wider gap
   adjacent words read as one phrase ("Edit Duplicate Close"). */
[data-opportunity-actions] {
  column-gap: var(--sp-5);
  align-items: center;
}
