/* Starless reader registration form. The PMS markup and native fallback share
   this editorial treatment so switching membership backends does not change
   the reader-facing experience. */

.starless-auth-page--register .starless-auth__form-pane {
  justify-content: flex-start;
  padding-top: clamp(2.75rem, 7vw, 5.5rem);
  padding-bottom: clamp(2.75rem, 7vw, 5.5rem);
}

.starless-auth-page--register .starless-auth__form-heading {
  margin-bottom: 1.7rem;
}

.starless-auth__registration-form {
  width: 100%;
  max-width: 520px;
}

.starless-auth__registration-form .pms-form,
.starless-auth__registration-form .starless-auth__form {
  width: 100%;
  max-width: none;
  margin: 0;
}

.starless-auth__registration-form .pms-form-fields-wrapper,
.starless-auth__registration-form .pms-form-fields-wrapper ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.starless-auth__registration-form .pms-account-section-wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem .85rem;
  order: 1;
  margin: 0;
  padding: 0;
}

.starless-auth__registration-form .pms-field-subscriptions {
  order: 2;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--auth-paper) 74%, var(--background));
}

.starless-auth__registration-form .pms-field-subscriptions:has(input[name="pmstkn2"]) {
  display: none;
}

.starless-auth__registration-form .pms-register-form-top-plans .pms-field-subscriptions {
  order: 0;
}

.starless-auth__registration-form .pms-field {
  display: grid;
  gap: .45rem;
  min-width: 0;
  margin: 0;
}

.starless-auth__registration-form .pms-field:has(> input[type="text"], > input[type="email"], > input[type="password"]) {
  position: relative;
  display: block;
  min-height: 54px;
}

.starless-auth__registration-form .starless-auth__field {
  min-width: 0;
  margin: 0;
}

.starless-auth__registration-form .pms-field > label,
.starless-auth__registration-form .starless-auth__field > span:first-child {
  color: var(--auth-ink);
  font-size: .82rem;
  font-weight: 700;
}

.starless-auth__registration-form .pms-field:has(> input[type="text"], > input[type="email"], > input[type="password"]) > label {
  position: absolute;
  inset-block-start: 27px;
  inset-inline-start: .75rem;
  z-index: 1;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: var(--s13-control-muted, var(--auth-muted));
  font-size: .8rem;
  font-weight: 400;
  line-height: 1.2;
  pointer-events: none;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  transition: inset-block-start 140ms ease, transform 140ms ease, padding 140ms ease, color 140ms ease, font-size 140ms ease;
  white-space: nowrap;
}

.starless-auth__registration-form .pms-field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]) {
  width: 100%;
  height: 54px;
  min-height: 54px;
  padding: 15px .75rem 7px;
  border: 1px solid var(--s13-control-border, var(--auth-line));
  border-radius: 0;
  outline: 0 !important;
  color: var(--foreground, var(--auth-ink));
  background: var(--s13-control-surface, color-mix(in srgb, var(--auth-paper) 82%, var(--background)));
  font: inherit;
  box-shadow: none !important;
  caret-color: var(--primary, var(--auth-accent));
  transition: border-color 140ms ease, background-color 140ms ease;
}

.starless-auth__registration-form .pms-field select {
  width: 100%;
  min-height: 54px;
  padding: .82rem 1rem;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  outline: none;
  color: var(--auth-ink);
  background: color-mix(in srgb, var(--auth-paper) 82%, var(--background));
  font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.starless-auth__registration-form .pms-field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):hover,
.starless-auth__registration-form .pms-field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus {
  border-color: var(--primary, var(--auth-accent));
}

.starless-auth__registration-form .pms-field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus {
  outline: 0 !important;
  background: var(--s13-control-surface, color-mix(in srgb, var(--auth-paper) 82%, var(--background)));
  box-shadow: none !important;
}

.starless-auth__registration-form .pms-field:has(> input[type="text"]:focus, > input[type="email"]:focus, > input[type="password"]:focus) > label,
.starless-auth__registration-form .pms-field:has(> input[type="text"]:not(:placeholder-shown), > input[type="email"]:not(:placeholder-shown), > input[type="password"]:not(:placeholder-shown)) > label {
  inset-block-start: 0;
  padding-inline: .4375rem;
  color: var(--primary, var(--auth-accent));
  background: var(--s13-control-surface, color-mix(in srgb, var(--auth-paper) 82%, var(--background)));
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: translateY(-50%);
}

.starless-auth__registration-form .pms-field input:not([type="radio"]):not([type="checkbox"])::placeholder {
  color: transparent;
}

.starless-auth__registration-form .pms-pass1-field,
.starless-auth__registration-form .pms-pass2-field,
.starless-auth__password-field {
  position: relative;
}

.starless-auth__registration-form .pms-pass1-field input,
.starless-auth__registration-form .pms-pass2-field input,
.starless-auth__password-field input {
  padding-inline-end: 3rem;
}

.starless-auth__password-toggle.kol-ui-button {
  position: absolute;
  z-index: 1;
  top: 50%;
  inset-inline-end: .55rem;
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  transform: translateY(-50%);
}

.starless-auth__registration-form .pms-pass1-field > .starless-auth__password-toggle,
.starless-auth__registration-form .pms-pass2-field > .starless-auth__password-toggle {
  top: 27px;
  transform: translateY(-50%);
}

.starless-auth__password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.starless-auth__registration-form .pms-field-description,
.starless-auth__registration-form .starless-auth__field small {
  margin: 0;
  color: var(--auth-muted);
  font-size: .74rem;
  font-style: normal;
  line-height: 1.5;
}

.starless-auth__registration-form .pms-field-errors,
.starless-auth__registration-form .pms_field-errors-wrapper,
.starless-auth__registration-form .pms-field-error .pms-field-errors-wrapper {
  margin: .35rem 0 0;
  color: var(--kol-error);
  font-size: .76rem;
  line-height: 1.5;
}

.starless-auth__registration-form .pms-field-errors ul,
.starless-auth__registration-form .pms_field-errors-wrapper ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.starless-auth__registration-form .pms-subscription-plan {
  position: relative;
  margin: 0 0 .65rem;
  padding: .85rem .9rem .75rem;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--auth-paper) 82%, var(--background));
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.starless-auth__registration-form .pms-subscription-plan:last-of-type {
  margin-bottom: 0;
}

.starless-auth__registration-form .pms-subscription-plan:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--auth-accent) 52%, var(--auth-line));
}

.starless-auth__registration-form .pms-subscription-plan:has(input:checked) {
  border-color: var(--auth-accent);
  outline: 2px solid color-mix(in srgb, var(--auth-accent) 38%, transparent);
  outline-offset: 1px;
  box-shadow: none;
}

.starless-auth__registration-form .pms-subscription-plan label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  margin: 0;
  color: var(--auth-ink);
  cursor: pointer;
}

.starless-auth__registration-form .pms-subscription-plan input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--auth-accent);
}

.starless-auth__registration-form .pms-subscription-plan-name {
  font-size: .9rem;
  font-weight: 800;
}

.starless-auth__registration-form .pms-subscription-plan-price {
  color: var(--auth-accent);
  font-size: .84rem;
  font-weight: 800;
  white-space: nowrap;
}

.starless-auth__registration-form .pms-subscription-plan-description {
  margin: .55rem 0 0 2rem;
  color: var(--auth-muted);
  font-size: .78rem;
  font-style: normal;
  line-height: 1.6;
}

.starless-auth__registration-form .pms-subscription-plan-auto-renew {
  margin: .8rem 0 0;
  padding-top: .8rem;
  border-top: 1px solid var(--auth-line);
}

.starless-auth__registration-form .pms-subscription-plan-auto-renew label {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--auth-muted);
  font-size: .78rem;
}

.starless-auth__registration-form .pms-subscription-plan-auto-renew input,
.starless-auth__registration-form .pms-field input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--auth-accent);
}

.starless-auth__registration-form .pms-paygates-holder,
.starless-auth__registration-form .pms-billing-details,
.starless-auth__registration-form .pms-credit-card-information {
  margin-top: 1rem;
}

.starless-auth__registration-form .pms-form-submit.kol-ui-button,
.starless-auth__register-submit.kol-ui-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  min-height: 56px;
  margin-top: 1.25rem;
  box-shadow: none;
  font: inherit;
  font-weight: 800;
}

.starless-auth__register-submit svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.starless-auth__registration-form .pms_success-messages-wrapper,
.starless-auth__registration-form .pms-form-errors-wrapper,
.starless-auth__registration-form .pms_field-errors-wrapper {
  margin: 0 0 1rem;
  padding: .75rem .85rem;
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--auth-paper) 78%, var(--background));
  font-size: .8rem;
  line-height: 1.55;
}

.starless-auth__registration-form .pms_success-messages-wrapper {
  color: var(--kol-success);
  border-color: color-mix(in srgb, var(--kol-success) 30%, var(--auth-line));
}

.starless-auth__registration-form .pms-form-errors-wrapper,
.starless-auth__registration-form .pms_field-errors-wrapper {
  color: var(--kol-error);
  border-color: color-mix(in srgb, var(--kol-error) 30%, var(--auth-line));
}

.starless-auth__message--error {
  display: block;
  max-width: 520px;
  margin: 0 0 1rem;
  color: var(--kol-error);
  border-color: color-mix(in srgb, var(--kol-error) 30%, var(--auth-line));
  background: color-mix(in srgb, var(--kol-error) 7%, var(--auth-paper));
}

.starless-auth__message--error.kol-ui-alert {
  grid-auto-flow: row;
  box-shadow: none;
}

.starless-auth__message--error p {
  margin: 0 0 .35rem;
  font-weight: 700;
}

.starless-auth__message--error ul {
  margin: 0;
  padding-left: 1.1rem;
}

.starless-auth__registration-already {
  max-width: 520px;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  color: var(--auth-muted);
  background: color-mix(in srgb, var(--auth-paper) 78%, var(--background));
  font-size: .88rem;
  line-height: 1.6;
}

.starless-auth__honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
}

/* The theme-owned registration route is intentionally quieter than the
   shortcode surface: one readable form, one brand mark, and no illustration. */
.starless-auth-page--register.starless-auth-page--minimal {
  display: block;
  max-width: 560px;
  min-height: 0;
  margin: clamp(1.5rem, 8vh, 4rem) auto;
  border: 0;
  background: transparent;
}

.starless-auth-page--minimal .starless-auth__form-pane {
  display: block;
  min-height: 0;
  padding: 0;
  border-inline-start: 0;
  background: transparent;
}

.starless-auth-page--minimal .starless-auth__minimal-brand {
  display: inline-flex;
  margin-block-end: clamp(2.25rem, 7vw, 3.5rem);
  color: var(--auth-ink);
}

.starless-auth-page--minimal .starless-auth__minimal-brand .starless-auth__brand-logo {
  width: min(160px, 100%);
  max-height: 48px;
}

.starless-auth-page--minimal .starless-auth__minimal-brand .starless-auth__brand-fallback {
  color: var(--auth-accent);
}

.starless-auth-page--minimal .starless-auth__form-heading,
.starless-auth-page--minimal .starless-auth__registration-form,
.starless-auth-page--minimal .starless-auth__switch {
  max-width: 440px;
}

.starless-auth-page--minimal .starless-auth__form-heading {
  margin-bottom: 1.5rem;
}

.starless-auth-page--minimal .starless-auth__registration-form .pms-account-section-wrapper,
.starless-auth-page--minimal .starless-auth__registration-form .starless-auth__register-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem .85rem;
}

.starless-auth-page--minimal .starless-auth__switch {
  margin-top: 1.25rem;
  text-align: center;
}

@media (max-width: 700px) {
  .starless-auth-page--register .starless-auth__form-pane {
    padding-top: 2.25rem;
    padding-bottom: 2.5rem;
  }
}

@media (max-width: 560px) {
  .starless-auth-page--register.starless-auth-page--minimal {
    width: min(100% - 2rem, 440px);
    margin-top: 2rem;
    margin-bottom: 2rem;
  }

  .starless-auth-page--minimal .starless-auth__minimal-brand {
    margin-block-end: 2.25rem;
  }
}

@media (max-width: 420px) {
  .starless-auth-page--register .starless-auth__form-pane {
    padding-top: 1.75rem;
    padding-bottom: 2rem;
  }

  .starless-auth__registration-form .pms-subscription-plan label {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .starless-auth__registration-form .pms-subscription-plan-price {
    grid-column: 2;
  }
}

/* The theme-owned registration route shares the compact login card. */
body.kol-account-register-page {
  min-height: 100vh;
  background-color: var(--background);
  color: var(--foreground);
}

.kol-theme-register-page,
.kol-theme-register-page * {
  box-sizing: border-box;
}

.kol-theme-register-page {
  width: min(520px, calc(100% - 32px));
  margin-inline: auto;
  padding: clamp(2.5rem, 8vw, 5.5rem) 0 4rem;
  color: var(--foreground);
  direction: rtl;
}

.kol-theme-register-page .starless-auth-page--register.starless-auth-page--minimal {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.kol-theme-register-page .starless-auth__form-pane {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(1.5rem, 5vw, 2.25rem);
  border: 1px solid var(--border);
  border-inline-start: 1px solid var(--border);
  border-radius: 0;
  color: var(--card-foreground, var(--foreground));
  background: var(--card);
  text-align: right;
}

.kol-theme-register-page .starless-auth-page--minimal .starless-auth__minimal-brand {
  display: flex;
  width: 100%;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: auto;
  gap: .6rem;
  overflow-wrap: anywhere;
  margin: 0 0 2.25rem;
  color: var(--foreground);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-align: center;
  text-decoration: none;
}

.kol-theme-register-page .starless-auth-page--minimal .starless-auth__minimal-brand .starless-auth__brand-logo {
  width: auto;
  max-width: min(150px, 42vw);
  height: auto;
  max-height: 44px;
  flex: 0 1 auto;
  object-fit: contain;
}

.kol-theme-register-page .starless-auth__brand-name {
  min-width: 0;
}

.kol-theme-register-page .starless-auth__form-heading {
  max-width: none;
  margin: 0 0 1.75rem;
}

.kol-theme-register-page .starless-auth__form-eyebrow {
  margin: 0 0 .55rem;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.3;
  text-transform: none;
}

.kol-theme-register-page .starless-auth__form-heading h1 {
  margin: 0 0 .6rem;
  color: inherit;
  font-family: var(--kol-font-ui), Georgia, serif;
  font-size: clamp(2rem, 7vw, 2.8rem);
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.15;
}

.kol-theme-register-page .starless-auth__form-heading > p:last-child {
  margin: 0;
  color: var(--muted-foreground);
  font-size: .9rem;
  line-height: 1.7;
}

.kol-theme-register-page [data-kol-account-login].kol-account-login--website-oauth {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
}

.kol-theme-register-page .kol-account-login__website-oauth {
  width: 100%;
  margin-block-start: 1rem;
}

.kol-theme-register-page .kol-account-login__website-oauth .kol-account-login__oauth-title {
  margin: 0 0 .25rem;
  font-size: .95rem;
  font-weight: 700;
  text-align: right;
}

.kol-theme-register-page .kol-account-login__website-oauth .kol-account-login__hint {
  margin: 0;
  color: var(--muted-foreground);
  font-size: .84rem;
  line-height: 1.6;
  text-align: center;
}

.kol-theme-register-page .kol-account-login__website-oauth .kol-account-login__oauth-buttons {
  display: grid;
  gap: .55rem;
  margin-block-start: .85rem;
}

.kol-theme-register-page .kol-account-login__website-oauth .kol-account-login__oauth-btn.kol-ui-button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border-radius: 0 !important;
  font: inherit;
  font-weight: 700;
}

.kol-theme-register-page .kol-account-login__oauth-icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.kol-theme-register-page .kol-account-login__oauth-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.kol-theme-register-page .kol-account-login__website-oauth .kol-account-login__divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-block: 1rem;
  color: var(--muted-foreground);
  font-size: .78rem;
}

.kol-theme-register-page .kol-account-login__website-oauth .kol-account-login__divider::before,
.kol-theme-register-page .kol-account-login__website-oauth .kol-account-login__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.kol-theme-register-page .starless-auth__registration-form,
.kol-theme-register-page .starless-auth-page--minimal .starless-auth__registration-form {
  width: 100%;
  max-width: none;
  margin: 0;
}

.kol-theme-register-page .starless-auth__registration-form .pms-form-submit.kol-ui-button,
.kol-theme-register-page .starless-auth__register-submit.kol-ui-button {
  min-height: 48px;
  margin-block-start: .25rem;
  border-radius: 0 !important;
  font: inherit;
  font-weight: 800;
}

.kol-theme-register-page .starless-auth__registration-form .pms-form-submit.kol-ui-button {
  display: block;
  width: min(100%, 360px);
  margin-inline: auto;
  text-align: center;
}

.kol-theme-register-page .starless-auth__register-submit.kol-ui-button {
  width: min(100%, 360px);
  margin-inline: auto;
}

.kol-theme-register-page .starless-auth__registration-form .pms-field select {
  border-color: var(--s13-control-border, var(--border));
  border-radius: 0;
  color: var(--foreground);
  background: var(--s13-control-surface, var(--background));
}

.kol-theme-register-page .starless-auth__registration-form .pms_success-messages-wrapper,
.kol-theme-register-page .starless-auth__registration-form .pms-form-errors-wrapper,
.kol-theme-register-page .starless-auth__registration-form .pms_field-errors-wrapper {
  border-radius: 0;
}

.kol-theme-register-page .starless-auth__registration-form .beehive {
  display: none !important;
}

.kol-theme-register-page .starless-auth__switch {
  max-width: none;
  margin: 1.5rem 0 0;
  color: var(--muted-foreground);
  font-size: .82rem;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 480px) {
  .kol-theme-register-page {
    width: min(100% - 24px, 520px);
    padding-top: 2rem;
  }

  .kol-theme-register-page .starless-auth__form-pane {
    padding: 1.35rem;
  }

  .kol-theme-register-page .starless-auth-page--minimal .starless-auth__minimal-brand {
    margin-block-end: 1.75rem;
  }
}
