.account-page {
  max-width: 60rem;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
}

@media (max-width: 800px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

.account-card-title {
  margin-top: 0;
  margin-bottom: 1rem;
}

.membership-status {
  margin-bottom: 0.75rem;
}

.membership-meta {
  margin: 0 0 1rem 0;
}

.membership-meta dt {
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--color-heading);
}

.membership-meta dd {
  margin: 0 0 0.75rem 0;
}

.membership-note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-subtle-text);
}

.membership-cancel-inline-form {
  display: inline;
}

.membership-cancel-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--color-accent);
  cursor: pointer;
}

.membership-cancel-link:hover {
  text-decoration: underline;
}

/* Auth form overall */
.auth-form {
  max-width: 420px;
  font-size: 0.95rem;
}

/* Each field block */
.auth-form .form-field {
  margin-bottom: 1.25rem;
}

/* Labels above inputs */
.auth-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Inputs styled to match site typography */
.auth-form input[type='email'],
.auth-form input[type='text'],
.auth-form input[type='password'] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.auth-form input[type='email']:focus,
.auth-form input[type='text']:focus,
.auth-form input[type='password']:focus {
  outline: none;
  border-color: #222;
}

/* Password label + "forgot" link on same row */
.form-field-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.auth-link-small {
  font-size: 0.85rem;
}

/* Remember me row */
.form-remember {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.5rem 0 1.5rem;
  font-size: 0.9rem;
}

/* Error text */
.form-error {
  margin-top: 0.35rem;
  color: #b00020;
  font-size: 0.85rem;
}

/* Submit button full-ish width but not edge-to-edge */
.auth-submit {
  width: 100%;
  text-align: center;
  margin-bottom: 1.25rem;
}

/* Small text under the button */
.auth-links {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* Form field wrapper used above (if not already defined) */
.form-field {
  margin-bottom: 1.25rem;
}

/* Password rules list */
.password-rules {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  font-size: 0.85rem;
  color: #777;
}

.password-rules li {
  display: flex;
  align-items: center;
  margin-bottom: 0.25rem;
}

/* Match indicator under confirm password */
.password-match {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #777;
}

/* Icon circle */
.rule-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #aaa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.4rem;
  box-sizing: border-box;
}

/* Default: empty circle */
.rule-icon::before {
  content: '';
}

/* When rule is satisfied */
.rule-met {
  color: #137333; /* green-ish text */
}

.rule-met .rule-icon {
  border-color: #137333;
  background: #137333;
}

/* Checkmark appears only when met */
.rule-met .rule-icon::before {
  content: '✓';
  color: #fff;
  font-size: 0.7rem;
}

/* Optional: change message text when passwords match */
.rule-met .password-match-text {
  font-weight: 500;
}

.section-divider-auth {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--color-subtle-text);
  font-family: var(--font-heading);
  font-size: var(--font-size-base);
  letter-spacing: 0.05em;
  margin-top: 1rem;
  margin-bottom: 1rem;
  max-width: 13rem;
}

.section-divider-auth::before,
.section-divider-auth::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--color-subtle-text);
}

/* Google button: subtle, in your secondary style */
.google-signin-button {
  width: 13rem;
  margin-top: 1rem;
}

/* === Rhythm & Ink modal === */

.ri-modal {
  position: fixed;
  inset: 0;
  display: none; /* hidden by default */
  z-index: 1000;
}

.ri-modal--open {
  display: block;
}

.ri-modal__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.ri-modal__dialog {
  position: relative;
  max-width: 480px;
  margin: 10vh auto;
  padding: 2rem 2.25rem;
  background: var(--color-bg, #fff);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.ri-modal__title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  color: var(--color-heading-text, #111);
}

.ri-modal__body {
  margin: 0 0 1.75rem;
  font-size: var(--font-size-base, 1rem);
  line-height: 1.6;
  color: var(--color-body-text, #232323);
}

.ri-modal__body strong {
  font-weight: 600;
}

.ri-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons inside modal */

.button--danger {
  background-color: #b3261e;
  border-color: #b3261e;
  color: #fff;
}

.button--danger:hover {
  filter: brightness(0.9);
}

.button--secondary {
  background-color: transparent;
  border: 1px solid var(--color-border, #ccc);
  color: var(--color-body-text, #232323);
}

.button--secondary:hover {
  background-color: var(--color-background-light, #f2f2f2);
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .ri-modal__dialog {
    margin: 15vh 1rem;
    padding: 1.5rem 1.25rem;
  }

  .ri-modal__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ri-modal__actions .button,
  .ri-modal__actions .button--danger,
  .ri-modal__actions .button--secondary {
    width: 100%;
    text-align: center;
  }
}
