.account-header {
  padding-top: .5rem;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 2rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.nav-account-link {
  align-items: center;
  background: rgb(2, 6, 23);
  border: 1px solid rgb(2, 6, 23);
  border-radius: .75rem;
  color: white;
  display: inline-flex;
  flex-shrink: 0;
  font-size: .875rem;
  font-weight: 900;
  justify-content: center;
  line-height: 1.25rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}

.nav-account-link:hover {
  background: rgb(29, 78, 216);
  border-color: rgb(29, 78, 216);
  color: white;
  transform: translateY(-1px);
}

.nav-account-link.secondary {
  background: white;
  border-color: rgb(226, 232, 240);
  color: rgb(51, 65, 85);
}

.nav-account-link.ghost {
  background: transparent;
  border-color: transparent;
  color: rgb(100, 116, 139);
}

.nav-account-link.secondary:hover {
  background: rgb(239, 246, 255);
  border-color: rgb(191, 219, 254);
  color: rgb(29, 78, 216);
}

.nav-account-link.ghost:hover {
  background: rgb(255, 241, 242);
  border-color: rgb(254, 205, 211);
  color: rgb(159, 18, 57);
}

.nav-account-link.active {
  background: rgb(29, 78, 216);
  border-color: rgb(29, 78, 216);
  color: white;
  pointer-events: none;
}

.nav-links .hidden,
#admin-link.hidden {
  display: none;
}

.account-shell #account-compare-link {
  display: none !important;
}

body.auth-pending:not(.nav-auth-ready) [data-nav-login],
body.auth-pending:not(.nav-auth-ready) [data-nav-account],
body.auth-pending:not(.nav-auth-ready) [data-nav-admin],
body.auth-pending:not(.nav-auth-ready) [data-nav-logout] {
  visibility: hidden;
}

body.auth-pending .comparator-intro,
body.auth-pending #compare-form,
body.auth-pending .account-nudge,
body.auth-pending #signed-out-view,
body.auth-pending #signed-in-view {
  visibility: hidden;
}

.nav-menu-toggle {
  align-items: center;
  background: white;
  border: 1px solid rgb(226, 232, 240);
  border-radius: .75rem;
  display: none;
  flex-direction: column;
  gap: .25rem;
  height: 2.75rem;
  justify-content: center;
  margin-left: auto;
  width: 2.75rem;
}

.nav-menu-toggle span {
  background: rgb(15, 23, 42);
  border-radius: 999px;
  display: block;
  height: 2px;
  transition: opacity .15s, transform .15s;
  width: 1.15rem;
}

.topbar.is-open .nav-menu-toggle span:first-child {
  transform: translateY(6px) rotate(45deg);
}

.topbar.is-open .nav-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.topbar.is-open .nav-menu-toggle span:last-child {
  transform: translateY(-6px) rotate(-45deg);
}

.profile-field.is-locked .input-wrap {
  background: rgb(241, 245, 249);
  opacity: .72;
}

.profile-field.is-locked input {
  cursor: not-allowed;
}

.auth-layout {
  display: grid;
  gap: 1.5rem;
  padding: 0 0 3rem;
}

.auth-layout.is-signed-in {
  grid-template-columns: minmax(0, 1fr);
}

.auth-copy {
  align-self: center;
  max-width: 34rem;
}

.auth-copy h1 {
  color: rgb(2, 6, 23);
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: .95;
}

.auth-copy p:not(.eyebrow) {
  color: rgb(71, 85, 105);
  font-size: 1rem;
  line-height: 1.8;
  margin-top: 1.25rem;
}

.trust-strip {
  display: grid;
  gap: .75rem;
  margin-top: 1.5rem;
}

.trust-strip div {
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 1rem;
  padding: 1rem;
}

.trust-strip strong,
.trust-strip span {
  display: block;
}

.trust-strip strong {
  color: rgb(2, 6, 23);
  font-size: .875rem;
  font-weight: 900;
}

.trust-strip span {
  color: rgb(100, 116, 139);
  font-size: .8125rem;
  font-weight: 700;
  margin-top: .25rem;
}

.auth-surface {
  background: white;
  border: 1px solid rgb(226, 232, 240);
  border-radius: .75rem;
  box-shadow: 0 20px 35px rgba(15, 23, 42, .1);
  min-height: 34rem;
  padding: 1rem;
}

.is-signed-in .auth-copy {
  display: none;
}

.is-signed-in .auth-surface {
  min-height: 0;
}

.auth-card-heading {
  align-items: flex-start;
  border-bottom: 1px solid rgb(226, 232, 240);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
  padding: .5rem .25rem 1.25rem;
}

.auth-card-heading .eyebrow {
  margin-bottom: .25rem;
}

.auth-card-heading h2 {
  color: rgb(2, 6, 23);
  font-size: 1.75rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1;
}

.auth-toggle {
  background: rgb(241, 245, 249);
  border: 1px solid rgb(226, 232, 240);
  border-radius: .875rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: .25rem;
  width: 100%;
}

.auth-toggle button {
  border-radius: .65rem;
  color: rgb(71, 85, 105);
  font-size: .875rem;
  font-weight: 900;
  min-height: 2.5rem;
  padding: 0 1rem;
}

.auth-toggle button.active {
  background: white;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
  color: rgb(2, 6, 23);
}

.account-form {
  display: grid;
  gap: 1rem;
  padding-top: 1.25rem;
}

.signup-fields {
  display: grid;
  gap: 1rem;
}

.signup-fields.hidden,
#signed-out-view.hidden,
#signed-in-view.hidden,
#profiles-panel.hidden,
#account-panel.hidden,
#notifications-panel.hidden,
.profile-fields.hidden,
.inline-status.hidden {
  display: none;
}

.account-field {
  display: grid;
  gap: .5rem;
}

.account-field span {
  color: rgb(71, 85, 105);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .14em;
  padding: 0 .25rem;
  text-transform: uppercase;
}

.account-field input {
  background: rgb(248, 250, 252);
  border: 1px solid rgb(226, 232, 240);
  border-radius: .875rem;
  color: rgb(2, 6, 23);
  font-size: 1rem;
  font-weight: 750;
  min-height: 3.5rem;
  outline: none;
  padding: 0 1rem;
  width: 100%;
}

.account-field input:focus {
  background: white;
  border-color: rgb(96, 165, 250);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .1);
}

.primary-auth-btn,
.secondary-auth-btn {
  align-items: center;
  border-radius: .875rem;
  display: inline-flex;
  font-size: .9375rem;
  font-weight: 900;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0 1.25rem;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s, transform .15s;
}

.primary-auth-btn {
  background: rgb(2, 6, 23);
  color: white;
}

.primary-auth-btn:hover {
  background: rgb(29, 78, 216);
  color: white;
  transform: translateY(-1px);
}

.primary-auth-btn:disabled {
  cursor: wait;
  opacity: .65;
}

.secondary-auth-btn {
  background: white;
  border: 1px solid rgb(226, 232, 240);
  color: rgb(51, 65, 85);
}

.secondary-auth-btn:hover {
  background: rgb(239, 246, 255);
  border-color: rgb(191, 219, 254);
  color: rgb(29, 78, 216);
}

.inline-status {
  border-radius: 1rem;
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 1rem;
  padding: .875rem 1rem;
}

.inline-status.info {
  background: rgb(239, 246, 255);
  color: rgb(30, 64, 175);
}

.inline-status.success {
  background: rgb(236, 253, 245);
  color: rgb(6, 95, 70);
}

.inline-status.error {
  background: rgb(255, 241, 242);
  color: rgb(159, 18, 57);
}

.profile-tabs {
  background: rgb(241, 245, 249);
  border: 1px solid rgb(226, 232, 240);
  border-radius: .875rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.25rem;
  padding: .25rem;
}

.profile-tabs button {
  border-radius: .65rem;
  color: rgb(71, 85, 105);
  font-size: .875rem;
  font-weight: 900;
  min-height: 2.5rem;
  padding: 0 1rem;
}

.profile-tabs button.active {
  background: white;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
  color: rgb(2, 6, 23);
}

.account-nudge {
  color: rgb(71, 85, 105);
  font-size: .95rem;
  font-weight: 750;
  line-height: 1.7;
  margin: 1.25rem auto 0;
  max-width: 42rem;
  text-align: center;
}

body.is-signed-in .hero {
  padding-bottom: 0;
}

body.is-signed-in .hero-copy {
  max-width: none;
  width: 100%;
}

body.is-signed-in .comparator-intro {
  display: none;
}

body.is-signed-in .account-nudge {
  margin: 0;
  max-width: none;
  padding: 0;
  text-align: center;
  width: 100%;
}

.account-nudge a {
  color: rgb(29, 78, 216);
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: .2em;
}

#account-current-email {
  color: rgb(100, 116, 139);
  font-weight: 850;
}

.account-actions {
  display: grid;
  gap: .75rem;
}

.profile-fetch-status {
  background: rgb(248, 250, 252);
  border: 1px solid rgb(226, 232, 240);
  border-radius: .875rem;
  display: grid;
  gap: .35rem;
  padding: .875rem 1rem;
}

.profile-fetch-status p {
  color: rgb(71, 85, 105);
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.5;
}

.profile-fetch-status span {
  color: rgb(2, 6, 23);
  font-weight: 950;
}

.settings-form {
  border-top: 1px solid rgb(226, 232, 240);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.settings-heading {
  display: grid;
  gap: .25rem;
}

.settings-heading h3,
.placeholder-panel h3 {
  color: rgb(2, 6, 23);
  font-size: 1.125rem;
  font-weight: 950;
}

.settings-heading p,
.placeholder-panel p:not(.eyebrow) {
  color: rgb(100, 116, 139);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.6;
}

.danger-zone {
  border-top-color: rgb(254, 205, 211);
}

.danger-auth-btn {
  align-items: center;
  background: rgb(159, 18, 57);
  border-radius: .875rem;
  color: white;
  display: inline-flex;
  font-size: .9375rem;
  font-weight: 900;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0 1.25rem;
  transition: background-color .15s, opacity .15s, transform .15s;
}

.danger-auth-btn:hover {
  background: rgb(190, 18, 60);
  transform: translateY(-1px);
}

.placeholder-panel {
  background: rgb(248, 250, 252);
  border: 1px solid rgb(226, 232, 240);
  border-radius: 1rem;
  margin-top: 1.25rem;
  padding: 1.25rem;
}

.is-saving {
  opacity: .72;
  pointer-events: none;
}

@media (max-width: 640px) {
  .brand small {
    display: none;
  }

  .nav-menu-toggle {
    display: inline-flex;
  }

  .nav-account-link {
    border-radius: .75rem;
    font-size: .8125rem;
    min-height: 2.5rem;
    padding: 0 .8rem;
    width: 100%;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .topbar.is-open .nav-links {
    display: flex;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: .875rem;
  }
}

@media (min-width: 640px) {
  .trust-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .auth-card-heading {
    align-items: center;
    flex-direction: row;
  }

  .auth-toggle {
    width: auto;
  }

  .account-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .topbar {
    margin-bottom: 2.5rem;
  }
}

@media (min-width: 960px) {
  .auth-layout:not(.is-signed-in) {
    grid-template-columns: minmax(0, .95fr) minmax(26rem, .75fr);
  }

  .auth-layout.is-signed-in {
    padding-top: 0;
  }

  .auth-surface {
    padding: 1.5rem;
  }
}
