.member-nav-button,
.member-primary-button,
.member-secondary-button,
.auth-dialog button,
.auth-dialog input {
  font: inherit;
}

.member-nav-button {
  min-height: 42px;
  color: #17120a;
  background: var(--yellow);
  border: 1px solid #ffe07e;
  border-radius: 24px;
  padding: 0 17px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}

.member-nav-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.member-page {
  background-image:
    radial-gradient(circle at 88% 14%, #f6bd2421, transparent 32%),
    linear-gradient(145deg, #12131c, #0b0c12);
}

.member-heading {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: end;
  gap: 8%;
  margin-bottom: 38px;
}

.member-heading h2 {
  max-width: 720px;
  margin-bottom: 0;
}

.member-heading > p {
  color: #e1e1e7;
  background: linear-gradient(135deg, #f6bd241c, #ffffff09);
  border: 1px solid #f6bd244d;
  border-left: 4px solid var(--yellow);
  border-radius: 14px;
  margin: 0;
  padding: 22px 24px;
  font-size: 15px;
  line-height: 1.7;
}

.member-locked,
.member-welcome {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  border: 1px solid #343643;
  border-radius: 16px;
  background: #ffffff08;
  padding: 30px;
}

.member-lock-icon {
  width: 58px;
  height: 58px;
  color: #17120a;
  background: var(--yellow);
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  transform: rotate(-45deg);
  box-shadow: 0 12px 30px #f6bd2429;
}

.member-locked small,
.member-welcome small {
  color: var(--yellow);
  letter-spacing: .13em;
  font-size: 10px;
  font-weight: 900;
}

.member-locked h3,
.member-welcome h3 {
  margin: 7px 0 5px;
  font-size: 24px;
}

.member-locked p,
.member-welcome p {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
}

.member-lock-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.member-primary-button,
.member-secondary-button {
  min-height: 46px;
  border-radius: 9px;
  padding: 0 18px;
  font-weight: 850;
  cursor: pointer;
}

.member-primary-button {
  color: #17120a;
  background: var(--yellow);
  border: 1px solid #ffe07e;
}

.member-secondary-button {
  color: var(--white);
  background: #ffffff09;
  border: 1px solid #ffffff35;
}

.member-primary-button:hover,
.member-secondary-button:hover {
  filter: brightness(1.08);
}

.member-unlocked[hidden],
.member-locked[hidden],
.auth-modal[hidden],
.auth-panel[hidden] {
  display: none !important;
}

.member-welcome {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: #20d39b52;
  background: linear-gradient(135deg, #20d39b12, #ffffff06);
}

.member-welcome h3 span {
  color: var(--yellow);
  overflow-wrap: anywhere;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.document-empty,
.document-card {
  min-height: 150px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  border: 1px solid #2f313e;
  border-radius: 14px;
  background: #12131b;
  padding: 24px;
}

.document-empty {
  grid-column: 1 / -1;
}

.document-empty > span,
.document-card > span {
  width: 42px;
  height: 48px;
  color: var(--yellow);
  border: 2px solid #f6bd2475;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.document-empty h3,
.document-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.document-empty p,
.document-card p {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
}

.document-card a {
  width: fit-content;
  color: #17120a;
  background: var(--yellow);
  border-radius: 7px;
  margin-top: 13px;
  padding: 9px 13px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  display: inline-flex;
}

body.auth-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: #030408d9;
  backdrop-filter: blur(8px);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  color: var(--text);
  background:
    radial-gradient(circle at 90% 6%, #f6bd2417, transparent 30%),
    #11121a;
  border: 1px solid #3a3c49;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 28px 90px #000000b3;
}

.auth-dialog:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  color: var(--white);
  background: #ffffff0b;
  border: 1px solid #ffffff20;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 44px;
}

.auth-brand > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-brand small {
  color: var(--yellow);
  letter-spacing: .11em;
  font-size: 9px;
  font-weight: 900;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #090a10;
  border: 1px solid #292b37;
  border-radius: 12px;
  margin: 26px 0 25px;
  padding: 5px;
}

.auth-tabs button {
  min-height: 42px;
  color: var(--muted);
  border: 0;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.auth-tabs button[aria-selected="true"] {
  color: #17120a;
  background: var(--yellow);
}

.auth-panel h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.auth-panel > p {
  color: var(--muted);
  margin: 0 0 23px;
  font-size: 14px;
}

.auth-panel form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-panel label:not(.auth-consent) {
  color: #e6e6ec;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 750;
}

.auth-panel input[type="email"],
.auth-panel input[type="password"],
.auth-panel input[type="text"] {
  width: 100%;
  min-height: 49px;
  color: var(--white);
  background: #090a10;
  border: 1px solid #383a47;
  border-radius: 9px;
  padding: 0 13px;
  outline: none;
}

.auth-panel input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px #f6bd241a;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 66px !important;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 7px;
  min-width: 50px;
  min-height: 35px;
  color: var(--yellow);
  border: 0;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.auth-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: #c8c8d0;
  margin: 7px 0 3px;
  font-size: 12px;
  line-height: 1.55;
}

.auth-consent input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--yellow);
}

.auth-submit {
  min-height: 49px;
  color: #17120a;
  background: var(--yellow);
  border: 1px solid #ffe07e;
  border-radius: 9px;
  margin-top: 8px;
  font-weight: 900;
  cursor: pointer;
}

.auth-submit:disabled {
  opacity: .62;
  cursor: wait;
}

.auth-text-button {
  width: fit-content;
  color: var(--yellow);
  border: 0;
  margin: 4px auto 0;
  padding: 6px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.auth-message {
  min-height: 0;
  color: #ffd8da;
  background: #ef222914;
  border: 1px solid #ef222940;
  border-radius: 9px;
  margin: 18px 0 0;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.55;
  display: none;
}

.auth-message.is-visible {
  display: block;
}

.auth-message.is-success {
  color: #baf5df;
  background: #20d39b12;
  border-color: #20d39b47;
}

@media (max-width: 920px) {
  .member-link {
    display: none;
  }

  .member-heading {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .member-locked {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .member-lock-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .topbar .nav-cta {
    display: none;
  }

  .member-nav-button {
    min-height: 40px;
    padding: 0 14px;
  }

  .member-heading > p {
    padding: 20px;
  }

  .document-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .member-locked,
  .member-welcome {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 20px;
  }

  .member-lock-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .member-welcome .member-secondary-button {
    width: 100%;
  }

  .auth-modal {
    padding: 10px;
    align-items: end;
  }

  .auth-dialog {
    width: 100%;
    max-height: calc(100vh - 10px);
    border-radius: 18px 18px 10px 10px;
    padding: 26px 20px 22px;
  }

  .auth-panel h2 {
    font-size: 25px;
  }
}

@media (max-width: 380px) {
  .wordmark > span:last-child {
    display: none;
  }
}
