/* Reader membership: private by default, comfortable at every screen size. */
.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 23px 0 29px;
}
.home-actions .button {
  min-height: 49px;
  padding: 13px 21px;
  font-size: 13px;
  gap: 18px;
}
.home-actions > p,
.home-actions > span,
.home-actions > .small-note {
  flex-basis: 100%;
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.button-accent {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.button-accent:hover {
  background: #10584f;
  border-color: #10584f;
  color: var(--white);
}
.header-member {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 39px;
  max-width: 175px;
  padding: 9px 15px;
  border: 1px solid var(--ink);
  border-radius: 24px;
  background: var(--ink);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}
.header-member:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--white);
}
.join-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 40px;
  margin: 38px 4.2% 55px;
  padding: 32px 35px;
  border: 1px solid var(--ink);
  background: #ecefe7;
  color: var(--ink);
}
.join-band > * { min-width: 0; }
.join-band .eyebrow { margin-bottom: 11px; }
.join-band h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -.7px;
}
.join-band p:not(.eyebrow) {
  max-width: 650px;
  margin-bottom: 0;
  font-size: 13px;
  line-height: 1.8;
  color: #4b5e62;
}
.join-band .button { min-height: 47px; font-size: 12px; }
.join-band .small-note,
.join-band > div > span:last-child {
  display: block;
  margin-top: 10px;
  font-size: 10px;
  line-height: 1.6;
}
#member-dialog {
  width: min(640px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 29px 32px 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 18px 70px #152b3933;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  scrollbar-gutter: stable;
}
#member-dialog::backdrop {
  background: #152b3966;
  backdrop-filter: blur(3px);
}
#member-dialog *,
#member-dialog *::before,
#member-dialog *::after { box-sizing: border-box; }
#member-dialog form { margin: 0; }
#member-dialog [hidden] { display: none !important; }
.member-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 21px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.member-top > div { min-width: 0; }
.member-top .eyebrow { margin: 0 0 9px; font-size: 9px; }
.member-top h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 39px;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.6px;
}
.member-top p:not(.eyebrow) {
  margin: 11px 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}
.member-dialog-close {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef0e9;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}
.member-dialog-close:hover { background: #e1e7dd; }
#member-dialog > p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.member-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px 16px;
  margin-top: 20px;
}
.member-form > * { min-width: 0; }
.member-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}
.member-field label,
.member-field > span:first-child { color: var(--ink); }
.member-field input,
.member-field select,
.member-field textarea,
.referral-box input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid #bdc9c2;
  border-radius: 5px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  box-shadow: none;
}
.member-field textarea { min-height: 90px; resize: vertical; }
.member-field input::placeholder,
.referral-box input::placeholder { color: #748080; opacity: 1; }
.member-field input[readonly],
.referral-box input[readonly] { background: #f7f8f3; }
.member-field small,
.member-field .field-help,
.member-field > p {
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted);
}
.member-field input[type="file"] { padding: 7px; font-size: 12px; }
.member-field input[type="file"]::file-selector-button {
  min-height: 33px;
  margin-right: 10px;
  padding: 6px 10px;
  border: 0;
  border-radius: 3px;
  background: var(--pale-teal);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.member-form > .member-check,
.member-form > .member-notice,
.member-form > .member-status,
.member-form > .member-error,
.member-form > .member-actions,
.member-form > .button,
.member-form > button,
.member-form > .member-privacy { grid-column: 1 / -1; }
.member-form > .button,
.member-form > button { min-height: 47px; justify-content: center; }
.member-check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-width: 0;
  min-height: 44px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.75;
  cursor: pointer;
}
.member-check input[type="checkbox"],
.member-check input[type="radio"] {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 4px 0 0;
  padding: 0;
  accent-color: var(--teal);
}
.member-check span,
.member-check div { min-width: 0; }
.member-check strong { display: block; font-weight: 600; color: var(--ink); }
.member-check small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.member-notice,
.member-status,
.member-error {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  line-height: 1.8;
}
.member-notice { background: var(--paper); color: #536467; }
.member-status { background: var(--pale-teal); color: #23584d; border-color: #c3d7ca; }
.member-error { background: #f9e8e0; color: #8b3827; border-color: #e4bfae; }
.member-status:empty,
.member-error:empty { display: none; }
.member-status[data-state="pending"],
.member-status.is-pending,
.member-notice[data-state="pending"],
.member-notice.phone-pending {
  background: #f5eddc;
  border-color: #ddc79f;
  color: #77551e;
}
.member-status strong,
.member-notice strong,
.member-error strong { font-weight: 600; }
.member-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 23px 0;
  min-width: 0;
}
.member-profile-header > div { min-width: 0; }
.member-avatar {
  display: grid;
  flex: 0 0 88px;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border: 1px solid #c6d4c9;
  border-radius: 50%;
  background: var(--pale-teal);
  color: var(--teal);
  font-family: var(--serif);
  font-size: 39px;
  font-weight: 400;
  line-height: 1;
  object-fit: cover;
  overflow: hidden;
}
.member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.member-profile-header h3 {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  line-height: 1.1;
}
.member-profile-header p { margin: 7px 0 0; font-size: 11px; color: var(--muted); }
.founder-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  max-width: 100%;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid #bed2c2;
  border-radius: 4px;
  background: #e4eee4;
  color: #245849;
  font-size: 10px;
  font-weight: 550;
  line-height: 1.6;
}
.member-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.member-stat {
  min-width: 0;
  padding: 16px 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
}
.member-stat strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 33px;
  font-weight: 400;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.4px;
}
.member-stat span,
.member-stat p {
  display: block;
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}
.member-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}
.member-actions > * { min-width: 0; }
.member-actions .button,
.member-actions > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 11px 15px;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}
.member-actions > button:not(.button):not(.button-accent):not(.member-delete) {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
.referral-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 21px 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}
.referral-box > * { min-width: 0; }
.referral-box > div {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.referral-box > label,
.referral-box > p,
.referral-box > h3,
.referral-box > .small-note { grid-column: 1 / -1; }
.referral-box > label { font-size: 12px; font-weight: 600; }
.referral-box > h3 { margin: 0; font-size: 14px; font-weight: 600; }
.referral-box > p { margin: 0; font-size: 11px; line-height: 1.8; color: var(--muted); }
.referral-box input { font-size: 13px; }
.referral-box button {
  min-height: 46px;
  padding: 11px 15px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 550;
}
.referral-box button:hover { background: var(--teal); border-color: var(--teal); }
.member-privacy {
  margin: 23px 0 0;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
}
.member-privacy summary {
  min-height: 32px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.member-privacy p { margin: 12px 0 0; }
.member-privacy ul { margin: 12px 0 0; padding-left: 18px; font-size: 12px; }
.member-delete {
  min-height: 44px;
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: #963e2c;
  font-size: 11px;
  line-height: 1.5;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.member-delete:hover { color: #6c2a1c; }
.member-public-preview {
  min-width: 0;
  margin: 23px 0;
  padding: 22px;
  border: 1px dashed #aebfb2;
  border-radius: 6px;
  background: #f1f4ec;
}
.member-public-preview > .eyebrow { margin-bottom: 12px; font-size: 9px; color: var(--teal); }
.member-public-preview > h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 28px; font-weight: 400; line-height: 1.2; }
.member-public-preview > p { margin: 12px 0 0; font-size: 12px; line-height: 1.8; color: var(--muted); }
.member-public-preview .member-profile-header { margin: 0; }
#member-dialog button:disabled,
#member-dialog input:disabled,
#member-dialog select:disabled {
  opacity: .55;
  cursor: not-allowed;
}
#member-dialog button:focus-visible,
#member-dialog input:focus-visible,
#member-dialog select:focus-visible,
#member-dialog textarea:focus-visible,
#member-dialog a:focus-visible,
#member-dialog summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}
#member-dialog input[aria-invalid="true"] { border-color: #b4583a; background: #fffaf7; }
@media (max-width: 700px) {
  .home-actions { flex-direction: column; align-items: stretch; gap: 10px; margin: 20px 0 26px; }
  .home-actions .button { width: 100%; min-height: 50px; justify-content: center; font-size: 13px; }
  .home-actions > p, .home-actions > span, .home-actions > .small-note { font-size: 11px; text-align: center; }
  .header-member { min-height: 41px; max-width: 135px; padding: 9px 12px; font-size: 10px; }
  .join-band { grid-template-columns: 1fr; gap: 22px; margin: 29px 4.2% 39px; padding: 25px 22px; }
  .join-band h2 { font-size: 35px; line-height: 1.07; }
  .join-band p:not(.eyebrow) { font-size: 13px; }
  .join-band .button { width: 100%; justify-content: center; min-height: 48px; }
  #member-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 23px 21px max(25px, env(safe-area-inset-bottom));
    border-radius: 14px;
    scrollbar-gutter: auto;
  }
  .member-top { gap: 12px; margin-bottom: 20px; padding-bottom: 18px; }
  .member-top h2 { font-size: 35px; }
  .member-top p:not(.eyebrow), #member-dialog > p { font-size: 13px; }
  .member-form { grid-template-columns: 1fr; gap: 18px; }
  .member-field { font-size: 13px; }
  .member-field input, .member-field select, .member-field textarea { min-height: 48px; font-size: 16px; }
  .member-field small, .member-field .field-help, .member-field > p { font-size: 12px; }
  .member-check { font-size: 13px; gap: 11px; padding: 3px 0; }
  .member-check small { font-size: 12px; }
  .member-notice, .member-status, .member-error { font-size: 12px; padding: 14px; }
  .member-profile-header { gap: 16px; align-items: flex-start; }
  .member-profile-header h3 { font-size: 29px; }
  .member-profile-header p { font-size: 12px; }
  .founder-badge { font-size: 10px; padding: 5px 8px; }
  .member-stats { grid-template-columns: 1fr; gap: 9px; }
  .member-stat { display: grid; grid-template-columns: minmax(65px, auto) 1fr; align-items: center; gap: 13px; padding: 15px; }
  .member-stat strong { margin: 0; font-size: 32px; }
  .member-stat span, .member-stat p { font-size: 12px; }
  .member-actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .member-actions .button, .member-actions > button { width: 100%; min-height: 48px; font-size: 13px; }
  .referral-box { grid-template-columns: 1fr; gap: 11px; padding: 15px; }
  .referral-box > div { grid-template-columns: 1fr; gap: 10px; }
  .referral-box input { min-height: 48px; font-size: 16px; }
  .referral-box button { width: 100%; min-height: 48px; font-size: 13px; }
  .member-privacy { font-size: 13px; line-height: 1.8; }
  .member-privacy summary { min-height: 44px; font-size: 13px; }
  .member-privacy ul { font-size: 12px; }
  .member-delete { font-size: 12px; }
  .member-public-preview { padding: 18px; }
  .member-public-preview .member-profile-header { flex-direction: column; }
}
@media (max-width: 360px) {
  #member-dialog { width: calc(100vw - 12px); padding-left: 17px; padding-right: 17px; }
  .member-top h2 { font-size: 31px; }
  .header-member { max-width: 112px; padding-left: 10px; padding-right: 10px; }
  .member-profile-header { flex-direction: column; }
}

/* Keep all six desktop destinations without crowding out the join action. */
@media (max-width: 1200px) {
  .site-header .header-guide { display: none; }
  .site-header .header-member { flex-shrink: 0; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .site-header { flex-wrap: nowrap; gap: 18px; }
  .site-header nav { min-width: 0; margin-left: auto; gap: 15px; }
  .site-header nav a { font-size: 11px; white-space: nowrap; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 44px;
    align-items: center;
    align-content: center;
    gap: 7px 18px;
    height: auto;
    min-height: 124px;
    padding-top: 13px;
  }
  .site-header > .wordmark { grid-column: 1; grid-row: 1; justify-self: start; }
  .site-header .masthead-copy { display: none; }
  .site-header nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    align-self: stretch;
    justify-content: space-between;
    min-width: 0;
    height: 44px;
    margin: 0;
    gap: 12px;
  }
  .site-header nav a { display: flex; min-height: 44px; font-size: 11px; white-space: nowrap; }
  .site-header .header-member { grid-column: 2; grid-row: 1; justify-self: end; max-width: 190px; }
}
@media (max-width: 640px) {
  .site-header .masthead-copy { display: none; }
  .site-header .header-member { margin-left: auto; max-width: 180px; min-height: 42px; font-size: 11px; }
}
@media (min-width: 1540px) {
  .join-band { max-width: 1410px; margin-left: auto; margin-right: auto; }
}
